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>

using namespace std;

int main()
{
	int hand[13];
	int i;
	int a;
	int pair,three,str,four;
	char aa;
	
	for(;cin >> a;)
	{
		for(i=0;i<13;i++)
			hand[i]=0;
		
		hand[a-1]++;
		
		for(i=1;i<5;i++)
		{
			cin >> aa >> a;
			hand[a-1]++;
		}
		
		pair=str=three=four=0;
		
		for(i=0;i<13;i++)
		{
			if(hand[i]==4)
				four=1;
			else if(hand[i]==2)
				pair++;
			else if(hand[i]==3)
				three=1;
			if(i!=12 && hand[i]==1 && hand[i+1]==1)
				str++;
		}
		if(hand[12]==1 && hand[0]==1 && hand[1]!=1)
			str++;
		
		if(str==4)
			cout << "straight" << endl;
		else if(four==1)
			cout << "four card" << endl;
		else if(pair==1 && three==1)
			cout << "full house" << endl;
		else if(three==1)
			cout << "three card" << endl;
		else if(pair==2)
			cout << "two pair" << endl;
		else if(pair==1)
			cout << "one pair" << endl;
		else
		 cout << "null" << endl;
	}
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	vector<int> H(5);
		while(~scanf("%d,%d,%d,%d,%d", &H[0] ,&H[1] ,&H[2] ,&H[3] ,&H[4]))
		{
			vector<int> L(32, 0);
			int kind = 0;
			for(int i = 0; i < 5; i++)
			{
				if(L[H[i]-1] == 0)
				{
					kind++;
				}
				L[H[i]-1]++;
			}

			if(kind == 2)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 4)
				{
					cout << "four pair" << endl;
					continue;
				}
				else if(mx == 3)
				{
					cout << "full house" << endl;
					continue;
				}
				cout << "error 1" << endl;
			}
			else if(kind == 5)
			{
				bool straight = false;
				for(int i = 0; i < 9; i++)
				{
					L[13] = L[0];
					L[14] = L[1];
					L[15] = L[2];
					L[16] = L[3];
					if(L[i] && L[i+1] && L[i+2] && L[i+3] && L[i+4])
					{
						straight = true;
					}
				}
				if(straight)
				{
					cout << "straight" << endl;
					continue;
				}

				cout << "null" << endl;
			}
			else if(kind == 3)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 3)
				{
					cout << "three card" << endl;
					continue;
				}
				else if(mx == 2)
				{
					cout << "two pair" << endl;
					continue;
				}
			}
			else if(kind == 4)
			{
				cout << "one pair" << endl;
			}
		}
}

C++: #include<cstdio>
int main(){
  int card[5],ans,cou=0,tmp,i,j;
  char yaku[7][15] = {"four card","full house","straight","three card","two pair","one pair","null"};
  while(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) != EOF){
    for(i=0;i<5;i++){
      if(card[i] == 1){
	card[i] = 14;
      }
    }
    for(i=0;i<5;i++){
      for(j=i+1;j<5;j++){
	if(card[i] > card[j]){
	  tmp = card[i];
	  card[i] = card[j];
	  card[j] = tmp;
	}
      }
    }
    i=0;
    if(card[0] == card[1] && card[1] == card[2] && card[2] == card[3] || card[1] == card[2] && card[2] == card[3] && card[3] == card[4]) ans = 0;
    else if(card[0] == card[1] && card[1] == card[2] && card[3] == card[4] || card[0] == card[1] && card[2] == card[3] && card[3] == card[4]) ans = 1;
    else if(card[1] == card[0] + 1 && card[2] == card[0] + 2 && card[3] == card[0] + 3 && card[4] == card[0] + 4) ans = 2;
    else if(card[i] == card[i+1] && card[i+1] == card[i+2] || card[i+1] == card[i+2] && card[i+2] == card[i+3] || card[i+2] == card[i+3] && card[i+3] == card[i+4]) ans = 3;
    else{
      for(i=0;i<4;i++){
	if(card[i] == card[i+1]){
	  cou++;
	}
      }
      if(cou == 2){
	ans = 4;
      }
      else if(cou == 1){
	ans = 5;
      }
      else{
	ans = 6;
      }
    }
    printf("%s\n",yaku[ans]);
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>

using namespace std;

int main() {
    string line;
    while(cin >> line) {
        for(int i = 0; i < line.size(); ++i)
            if(line[i] == ',') line[i] = ' ';
        istringstream is(line);
        int v[5];
        for(int i = 0; i < 5; ++i) is >> v[i];

        sort(v, v+5);
        string ans;
        if(v[1]==v[2] && v[2]==v[3] && (v[0]==v[1]||v[3]==v[4])) ans = "four card";
        else if((v[0]==v[1] && (v[2]==v[3] && v[3]==v[4])) || ((v[0]==v[1] && v[1]==v[2]) && v[3]==v[4])) ans = "full house";
        else if(v[0]+1==v[1] && v[1]+1==v[2] && v[2]+1==v[3] && v[3]+1==v[4]) ans = "straight";
        else if(v[0]==1 && v[1]==10 && v[2]==11 && v[3]==12 && v[4]==13) ans = "straight";
        else if((v[0]==v[1] && v[1]==v[2]) || (v[1]==v[2] && v[2]==v[3]) || (v[2]==v[3] && v[3]==v[4])) ans = "three card";
        else if(unique(v, v+5) - v == 3) ans = "two pair";
        else if(unique(v, v+5) - v == 4) ans = "one pair";
        else ans = "null";

        cout << ans << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int a[5];

bool isStraight(){
	vector<int> n;
	for(int i=0 ; i<5 ; i++){
		n.push_back(a[i]);
	}
	sort( n.begin(), n.end() );
	if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
		return true;
	}
	if( n[0]==1 && n[1]==10 && n[2]==11 && n[3]==12 && n[4]==13){
		return true;
	}
	return false;
}

string checkCard(){
	int n, count, c[5];
	int c2=0, c3=0, c4=0;

	for(int j=0 ; j<5 ; j++){
		count = 0;
		n = a[j];
		for(int i=0 ; i<5 ; i++){
			if(a[i]==n)count++;
		}
		c[j] = count;
	}
	for(int i=0 ; i<5 ; i++){
		if(c[i]==2)c2++;
		if(c[i]==3)c3++;
		if(c[i]==4)c4++;
	}
	if(c4==4) return "four card";
	else if(c3==3 && c2==2) return "full house";
	else if( isStraight() ) return "straight";
	else if(c3==3) return "three card";
	else if(c2==4) return "two pair";
	else if(c2==2) return "one pair";
	else return "null";
}

int main(){
	string str;
	char s[80];
	while( scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4] ) != EOF ){
		str = checkCard();
		printf("%s\n",str.c_str());
	}
	return 0;
}