Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), ",")
		cards := make([]int, 5)
		for i :=range input {
			cards[i], _ = strconv.Atoi(input[i])
		}
		sort.Sort(sort.IntSlice(cards))
		if cards[0] == cards[1] && cards[2] == cards[3] && cards[2] == cards[1] {
			fmt.Println("four card")
		} else if cards[1] == cards[2] && cards[3] == cards[4] && cards[3] == cards[2]{
			fmt.Println("four card")
		} else if cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13 {
			fmt.Println("straight")
		} else if cards[0]+1 == cards[1] && cards[1]+1 == cards[2] && cards[2]+1 == cards[3] && cards[3]+1 == cards[4] {
			fmt.Println("straight")
		} else if (cards[0] == cards[1] && cards[1] == cards[2]) || (cards[1] == cards[2] && cards[2] == cards[3]) || (cards[2] == cards[3] && cards[3] == cards[4]) {
			fmt.Println("three card")
		} else if ((cards[0] == cards[1]) && ((cards[2] == cards[3]) || (cards[3] == cards[4]))) || ((cards[1] == cards[2]) && (cards[3] == cards[4])) {
			fmt.Println("two pair")
		} else if cards[0] == cards[1] || cards[1] == cards[2] || cards[2] == cards[3] || cards[3] == cards[4] {
			fmt.Println("one pair")
		} else {
			fmt.Println("null")
		}
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;



string judge(int* nums){
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	string ret="";
	foreach(it,count){
		if(it->second>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(it->second==4){
			ret = "four card";
			break;
		}else if(it->second==3){
			if(is2){
				ret = "full house";
				break;
			}else{
				is3 = true;
			}
		}else if(it->second==2){
			if(is3){
				ret = "full house";
				break;
			}else if(is2){
				ret = "two pair";
				break;
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}else if(ret!=""){
		return ret;
	}else if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}



int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>


using namespace std;

int solve(vector<int> _p, string *result){

	vector <int> cnt(5, 0);
	int max = 0;
	int cnt_pair = 0;

	for (int i = 0; i < 5; i++){
		for (int j = 0; j < 5; j++){
			if (_p[i] == _p[j]){
				cnt[i]++;
				if (cnt[i]>max) max = cnt[i];
			}
		}
	}

	if (max == 4){
		*result = "four card";
	}
	else if (max == 3){
		*result = "three card";
		for (int i = 0; i < 5; i++){
			if (cnt[i] == 2){
				*result = "full house";
				break;
			}
		}
	}
	else if (max == 2){
		*result = "one pair";
		for (int i = 0; i < 5; i++){
			if (cnt[i] == 2){
				cnt_pair++;
			}
		}
		if (cnt_pair == 4){
			*result = "two pair";
		}
	}
	else{
		*result = "straight";
		sort(_p.begin(), _p.end());
		for (int i = 0; i < 3; i++){
			if (_p[i]+1 != _p[i+1]){
				*result = "null";
				break;
			}
		}
		if (*result == "straight"){
			if ((_p[3] + 1 == _p[4]) || (_p[3] == 13 && _p[4] == 1))
				;
			else
				*result = "null";
		}
	}

	//*result = "one pair";
	return 1;
}

int main(){

	int buf;
	char dummy;
	vector<int> p;
	string result;

	while (1){
		for (int i = 0; i < 4; i++){
			if (cin >> buf >> dummy);else return 0;
			p.push_back(buf);
		}
		cin >> buf;
		p.push_back(buf);


		solve(p, &result);
		
		cout << result << endl;


		p.clear();
	}

	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

#define ??????????????£?????? 114514

string pairs[2][3] = { {"null","one pair","two pair"},
					  {"three card","full house",""} };

int main() {
	int n, c, three, two;
	char t;
	string res;
	while (!cin.eof()) {
		int card[13] = { 0 }, c = 0, three = 0, two = 0;
		for (int i = 0; i < 4; i++) {
			cin >> n >> t;
			card[n - 1]++;
		}
		cin >> n;
		card[n - 1]++;

		for (int i = 0; i < 13; i++) {
			if (card[i] == 4) {
				c = ??????????????£??????;
				break;
			} else if(card[i] == 3) {
				three++;
			} else if(card[i] == 2) {
				two++;
			}

			if (card[i] == 1) {
				c++;

				if (c == 4 && i == 12 && card[0] == 1) {
					c = 5;
					break;
				}
			} else if(card[i] == 0 && c != 5 && c > 0) {
				c = 0;
			}
		}
		if (c == 5) {
			cout << "straight" << endl;
			continue;
		}

		if (c == ??????????????£??????) {
			cout << "four card" << endl;
			continue;
		}

		cout << pairs[three][two] << endl;
	}

	return 0;
}

C++: #include <algorithm>
#include <iostream>
using namespace std;
int main() {
  int c[5];
  char cm;
  while (cin >> c[0] >> cm >> c[1] >> cm >> c[2] >> cm >> c[3] >> cm >> c[4]) {
    sort(c, c + 5);
    int same = 0, two = 0, t = 1, i;
    for (i = 0; i < 4; i++)
      if (c[i] == c[i + 1]) {
        t++;
        if (t == 2) two++;
        same = max(same, t);
      }
      else t = 1;
    bool full = false;
    if (c[0] == c[1] && c[3] == c[4] && (c[1] == c[2] || c[2] == c[3])) full =
      true;
    bool st = true;
    if (c[0] == 1 && c[1] == 10) {
      for (i = 1; i < 4; i++)
        if (c[i] + 1 != c[i + 1]) st = false;
    }
    else {
      for (i = 0; i < 4; i++)
        if (c[i] + 1 != c[i + 1]) st = false;
    }
    cout
      << ((same == 4) ? "four card" : (full) ? "full house" :
          (st) ? "straight" : (same == 3) ? "three card" :
          (same == 2) ? ((two == 2) ? "two pair" : "one pair") : "null")
      << endl;
  }
}