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 <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)

static const double PI=6*asin(0.5);
typedef complex<double> P;
typedef long long ll;


int a[5]={0};
int c[14]={0};
int node;
char t;
int tmp;

int main(){
	while(cin>>tmp){
		c[tmp]++;
		rep(i,4){
			cin>>t>>tmp;
			c[tmp]++;
		}
		rep(i,14){
			a[c[i]]++;
		}
		bool str=false;
		rep(i,10){
			if(c[i]==1){
				rep(j,4){
					if(c[i+j+1]!=1){
						str=false;
						break;
					}
					else if(j==3) str=true;
				}
			}
			if(str) break;
		}
		if(c[1]==1&&c[10]==1&&c[11]==1&&c[12]==1&&c[13]==1) str=true;
		if(a[4]==1) cout<<"four card\n";
		else if(a[3]==1&&a[2]==1) cout<<"full hause\n";
		else if(str) cout<<"straight\n";
		else if(a[3]==1) cout<<"three card\n";
		else if(a[2]==2) cout<<"two pair\n";
		else if(a[2]==1) cout<<"one pair\n";
		else cout<<"null\n";
		
		rep(i,14) c[i]=0;
		rep(i,5) a[i]=0;
	}
	return 0;
}

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 card" << 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 <= 10; i++)
				{
					L[13] = L[0];
					if(L[i] && L[i+1] && L[i+2] && L[i+3] && L[i+4])
					{
						straight = true;
					}
				}
				if(straight)
				{
					cout << "straight" << endl;
					continue;
				}
				else
				{
					cout << "null" << endl;
					continue;
				}
			}
			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;
				continue;
			}
		}
}

C++: #include <stdio.h>

#define RANKS 13
#define CARDS 5

int scanCards(int a[]){
	return scanf("%d,%d,%d,%d,%d",a, a+1, a+2, a+3, a+4);
}

int isStraight(int a[]){
	for (int i=0; i<=10; i++){
		int flg = 1;
		for (int j=0; j<5; j++){
			if (a[i+j] != 1){
				flg=0;
				break;
			}
		}
		if (flg) return 1;
	}
	return 0;
}


int main(void){
	int rank[CARDS];
	int count[RANKS+1]; // count[13] = count[0]
	int pair, trio, quod;
	
	while (scanCards(rank) != EOF){
		pair = trio = quod = 0;
		for (int i=0; i<RANKS; i++) count[i] = 0;
		for (int i=0; i<CARDS; i++) count[rank[i]-1]++;
		count[RANKS] = count[0];
		for (int i=0; i<RANKS; i++){
			if (count[i]==2) pair++;
			if (count[i]==3) trio++;
			if (count[i]==4) quod++;
		}
		
		if (quod==1) puts("four card");
		else if (pair==1 && trio==1) puts("full house");
		else if (isStraight(count)) puts("straight");
		else if (trio==1) puts("three card");
		else if (pair==2) puts("two pair");
		else if (pair==1) puts("one pair");
		else puts("null");
	}
	
	return 0;
}

C++: //0038
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int l[5];
	char c;
	while (cin) {
		cin >> l[0] >> c;
		cin >> l[1] >> c;
		cin >> l[2] >> c;
		cin >> l[3] >> c;
		cin >> l[4];
		sort(l, l + 5);
		if (l[0] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[4] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[0] == l[1] && l[1] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[0] == l[1] && l[3] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[4] == l[3] + 1 && l[3] == l[2] + 1 && l[2] == l[1] + 1 && l[1] == l[0] + 1)
			cout << "straight";
		else if (l[0] == 1 && l[1] == 10 && l[2] == 11 && l[3] == 12 && l[4] == 13)
			cout << "straight";
		else if (l[0] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[4] && l[3] == l[2])
			cout << "three card";
		else if (l[0] == l[1] && l[2] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[2] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] || l[1] == l[2] || l[2] == l[3] || l[3] == l[4])
			cout << "one pair";
		else cout << "null";
		cout << endl;
	}
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;

int n[5];

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