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

int h[6];

int sq(int n){
    return n*n;
}

int find( int n , int s = 0 ){
    int count = 0, m = -1, mm = 0;
    for(int i = s; i < 6; i++){
        if( m == h[i] ){
            count++;
        }else{
            if( count == n ){
                mm = m;
                break;
            }
            m = h[i];
            count = 1;
        }
    }
    return mm;
}

int main(){
    while( scanf("%d,%d,%d,%d,%d",
                 h, h+1, h+2, h+3, h+4) != EOF ){
        sort(h, h+5);
        if( find(4) ) puts("four card");
        else if( find(3)*find(2) && 
                 find(3) != find(2) ) puts("full house");
        else if( (h[1]-h[0])*(h[2]-h[1])*(h[3]-h[2])*(h[4]-h[3]) == 1 ||
                 (h[0] == 1 && h[1] == 10 && h[2] == 11 &&
                  h[3] == 12 && h[4] == 13) ){
            puts("straight");
        }else if( find(3) ){
            puts("three card");
        }else if( find(2)*find(2,2) && find(2) != find(2,2) ){
            puts("two pair");
        }else if( find(2) ){
            puts("one pair");
        }else{
            puts("null");
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <string>

using namespace std;

int main() {
        const int N = 5;
        const string yaku[] = {
                "null",
                "one pair",
                "two pair",
                "three card",
                "straight",
                "full house",
                "four card"
        };

        while (true) {
                int tehuda[N];
                int ans;
                int input = scanf("%d,%d,%d,%d,%d",
                        &tehuda[0], &tehuda[1], &tehuda[2], &tehuda[3], &tehuda[                                                      4]);
                if (input == EOF) {
                        break;
                }
                for (int i = 0; i < N; i++) {
                        for (int j = N - 1; j > i; j--) {
                                if (tehuda[j - 1] > tehuda[j]) {
                                        int tmp = tehuda[j - 1];
                                        tehuda[j - 1] = tehuda[j];
                                        tehuda[j] = tmp;
                                }
                        }
                }

                if ((tehuda[0] == tehuda[1] && tehuda[1] == tehuda[2] &&
                                        tehuda[2] == tehuda[3]) ||
                                (tehuda[1] == tehuda[2] && tehuda[2] == tehuda[3                                                      ] &&
                                 tehuda[3] == tehuda[4])) {
                        ans = 6;
                } else if ((tehuda[0] == tehuda[1] && tehuda[1] == tehuda[2] &&
                                        tehuda[3] == tehuda[4]) ||
                                (tehuda[0] == tehuda[1] && tehuda[2] == tehuda[3                                                      ] &&
                                 tehuda[3] == tehuda[4])) {
                        ans = 5;
                } else if ((tehuda[0] == tehuda[1] && tehuda[1] == tehuda[2]) ||
                                (tehuda[1] == tehuda[2] && tehuda[2] == tehuda[3                                                      ]) ||
                                (tehuda[2] == tehuda[3] && tehuda[3] == tehuda[4                                                      ])) {
                        ans = 3;
                } else if ((tehuda[0] == tehuda[1] && (tehuda[2] == tehuda[3] ||
                                                tehuda[3] == tehuda[4])) ||
                                (tehuda[1] == tehuda[2] && tehuda[3] == tehuda[4                                                      ])) {
                        ans = 2;
                } else if ((tehuda[0] == tehuda[1]) || (tehuda[1] == tehuda[2])                                                       ||
                                (tehuda[2] == tehuda[3]) || (tehuda[3] == tehuda                                                      [4])) {
                        ans = 1;
                } else if ((tehuda[0] + tehuda[4] == tehuda[2] * 2 &&
                                        tehuda[2] * 2 == tehuda[1] + tehuda[3])                                                       ||
                                (tehuda[0] == 1 && tehuda[1] == 10 && tehuda[2]                                                       == 11 &&
                                 tehuda[3] == 12 && tehuda[4] == 13)) {
                        ans = 4;
                } else {
                        ans = 0;
                }
                printf("%s\n", yaku[ans].c_str());
        }

        return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int ary[20],te[5],num[10];
int main(){
	while(scanf("%d,%d,%d,%d,%d",&te[0],&te[1],&te[2],&te[3],&te[4])>0){
		fill(ary,ary+20,0);
		fill(num,num+10,0);
		for(int i=0;i<5;i++) ary[te[i]]++;
		for(int i=1;i<=13;i++) num[ary[i]]++;
		bool isstt=false;
		for(int i=1;i<10;i++){
			bool fla=true;
			for(int j=0;j<5;j++){
				if(ary[i+j]!=1){
					fla=false;
					break;
				}
			}
			if(fla) isstt=true;
		}
		if((!isstt)&&ary[1]==1&&ary[10]==1&&ary[11]==1&&ary[12]==1&&ary[13]==1) isstt=true;
		if(num[4]>0) cout<<"four card"<<endl;
		else if(num[3]>0&&num[2]>0) cout<<"full house"<<endl;
		else if(isstt) cout<<"straight"<<endl;
		else if(num[3]>0) cout<<"three card"<<endl;
		else if(num[2]>1) cout<<"two pair"<<endl;
		else if(num[2]>0) cout<<"one pair"<<endl;
		else cout<<"null"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
	
	while(1){
	int a=0,b,c,d,e,x;
	scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);
	for(int i=0;i<5;i++){
		if(a>b){x=a;a=b;b=x;}
		if(b>c){x=b;b=c;c=x;}
		if(c>d){x=c;c=d;d=x;}
		if(d>e){x=d;d=e;e=x;}
	}
	if(a==0)return 0;
	if(b==c&&c==d&&(a==b||d==e))cout<<"four card"<<endl;
	else if(a==b&&d==e&&(b==c||c==d))cout<<"full house"<<endl;
	else if(a==b&&b==c||b==c&&c==d||c==d&&d==e)cout<<"three card"<<endl;
	else if(a==b&&(c==d||c==e)||b==c&&d==e)cout<<"two pair"<<endl;
	else if(a==b||b==c||c==d||d==e)cout<<"one pair"<<endl;
	else if((b==a+1||b==a+9)&&c==b+1&&d==c+1&&e==d+1)cout<<"straight"<<endl;
	else cout<<"null"<<endl;
	}
}