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 <cstdio>
using namespace std;

bool isFourCards(int* cards) {
    return cards[0] == cards[3] || cards[1] == cards[4];
}

bool isFullHouse(int* cards) {
    return cards[0] == cards[1] && cards[3] == cards[4] && (cards[2] == cards[1] || cards[2] == cards[3]);
}

bool isStraight(int* cards) {
    return cards[1] + 1 == cards[2] && cards[2] + 1 == cards[3] && cards[3] + 1 == cards[4]
        && (cards[0] + 1 == cards[1] || (cards[0] == 1 && cards[4] == 13));
}

bool isThreeCards(int* cards) {
    return (cards[0] == cards[1] && cards[1] == cards[2])
        || (cards[1] == cards[2] && cards[2] == cards[3])
        || (cards[2] == cards[3] && cards[3] == cards[4]);
}

bool isTwoPairs(int* cards) {
    return (cards[0] == cards[1] && cards[2] == cards[3])
        || (cards[0] == cards[1] && cards[3] == cards[4])
        || (cards[1] == cards[2] && cards[3] == cards[4]);
}

bool isOnePair(int* cards) {
    return cards[0] == cards[1] || cards[1] == cards[2] || cards[2] == cards[3] || cards[3] == cards[4];
}

int main() {
    const char* hands[] = {
        "four card", "full house", "straight", "three card", "two pair", "one pair", "null",
    };
    int cards[5];
    while (scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4]) != EOF) {
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 4 - i; j++) {
                if (cards[j] > cards[j + 1]) {
                    int temp = cards[j];
                    cards[j] = cards[j + 1];
                    cards[j + 1] = temp;
                }
            }
        }
        int ret = 6;
        if (isFourCards(cards)) {
            ret = 0;
        } else if (isFullHouse(cards)) {
            ret = 1;
        } else if (isStraight(cards)) {
            ret = 2;
        } else if (isThreeCards(cards)) {
            ret = 3;
        } else if (isTwoPairs(cards)) {
            ret = 4;
        } else if (isOnePair(cards)) {
            ret = 5;
        }
        cout << hands[ret] << endl;
    }
}

C++: #include <string>
#include <iostream>
#include <map>
#include <cstdio>

using namespace std;

int main(){
	int hand[5];

	while(~scanf("%d", &hand[0])){
		for(int i = 1; i < 5; i++){
			scanf(",%d", &hand[i]);
		}
		int num[15] = {0};

		for(int i = 0; i < 5; i ++){
			if(hand[i] == 1){
				hand[i] += 13;
			}
			num[hand[i]]++;
		}

		int h[7] = {0};
		string s[] = {"null", "one pair", "two pair", "three card", "straight", "full house", "four card"};
		int seq = 0;

		h[0] = 1;
		for(int i = 2; i < 15; i++){
			if(num[i-1] && num[i]){
				seq++;
			}
			if(num[i] == 2){
				h[1]++;
			}
			if(num[i] == 3){
				h[3]++;
			}
			if(num[i] == 4){
				h[6]++;
			}
		}
		if(h[1] > 1){
			h[2]++;
		}
		if(h[1] && h[3]){
			h[5]++;
		}
		if(seq == 4){
			h[4]++;
		}

		for(int i = 6; i >= 0; i--){
			if(h[i]){
				cout << s[i] << endl;
				break;
			}
		}
	}


	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>

using namespace std;

int main(void){
	int card[15],cards[5];
	int a[5];
	int b;
	bool y=false;
	while(~scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		for(b=0;b<=14;b++){
			card[b]=0;
		}
		for(b=0;b<=4;b++){
			cards[b]=0;
		}
		y=false;
		for(b=0;b<=4;b++){
			card[a[b]]+=1;
		}
		for(b=0;b<14;b++){
			cards[card[b]]+=1;
		}
		if(cards[4]==1)cout << "four card" << endl;
		else if(cards[3]==1 && cards[2]==1)cout << "full house" << endl;
		else if(cards[3]==1)cout << "three card" << endl;
		else if(cards[2]==2)cout << "two pair" << endl;
		else if(cards[2]==1)cout << "one pair" << endl;
		else{
			if(card[1]==1 && card[10]==1 && card[11]==1 && card[12]==1 && card[13]==1)cout << "straight" << endl,y=true;
			for(b=1;b<=9;b++){
				if(card[b]==1 && card[b+1]==1 && card[b+2]==1 && card[b+3]==1 && card[b+4]==1){
					cout << "straight" << endl;
					y=true;
				}
			}
			if(y==false)cout << "null" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	vector<int> c(5);
	char a;
	while(cin >> c[0] >> a >> c[1] >> a >> c[2] >> a >> c[3] >> a >> c[4]){
		bool yaku=false;
		int cnt[5]={0};
		sort(c.begin(),c.end());
		if((c[0]==(c[1]-1) && c[0]==(c[2]-2) && c[0]==(c[3]-3) && c[0]==(c[4]-4)) || (c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13)) {cout << "straight" << endl ; continue;} 
		for(int i=0;i<5;++i){
			for(int j=i+1;j<5;++j){
				if(c[i]==c[j] && c[i]!=-1) cnt[i]++, c[j]=-1; 
			}
		}
		for(int i=0;i<5;++i){
			if(cnt[i]==3) {cout << "four card" << endl;yaku=true; break;}
			else if(cnt[i]==2) {
				if(cnt[3]==1) {cout << "full house" << endl; yaku=true;  break;}
				else {cout << "three card" << endl; yaku=true; break;}
			}
			else if(cnt[i]==1) {
				if(cnt[2]==2) {cout << "full house" << endl;yaku=true; break;}
				else if (cnt[i+2]==1|| cnt[i+3]==1) {cout << "two pair" << endl; yaku=true; break;}
				else {cout << "one pair" << endl; yaku=true; break;} 
			}
		}
		if (!yaku) cout << "null" << endl;
	}
	return 0; 
}