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 cards[5];
int card[14]={0};


int main()
{
	start:
	while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4])!=EOF)
	{
		fill(card,card+14,0);
		for(int i=0;i<5;i++)
		{
			card[cards[i]-1]++;
			if(cards[i]==1)card[13]++;
		}
		for(int i=0;i<13;i++)
		{
			if(card[i]==4)
			{
				printf("four card\n");
				goto start;
			}
			if(card[i]==3)
			{
				for(int j=0;j<13;j++)
				{
					if(card[j]==2)
					{
						printf("full house\n");
					    goto start;
					}
				}
				printf("three card\n");
					goto start;
			}
		}
		int flag=0;
		for(int i=0;i<13;i++)
		{
			if(card[i]==2)flag++;
		}
		if(flag==2)
		{
			printf("two pair\n");
					goto start;
		}
		if(flag==1)
		{
			printf("one pair\n");
					goto start;
		}
		for(int i=0;i<14;i++)
		{
			int k=1;
			for(int j=0;j<5;j++)
			{
				k*=card[i+j];
			}
			if(k==1)
			{
				printf("straight\n");
				goto start;
			}
		}
		printf("null\n");
		goto start;
	}
　　　　return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef vector <int> vi;
typedef vector <string> vs;
#define N1 5
#define N2 13
int main(void){
	vi card(N2);
	string prize[7]={"null","one pair","two pair","three card","straight","full house","four card"};
	while (true){
		for (int i=0; i<N2; i++)
			card[i]=0;
		int a=0, b=0, d=N2, p=0,tmp;
		for (int i=0;i<N1;i++){
			char c;
			if (i!=0) cin>>c;
			cin>>tmp;
			if (cin.eof()) break;
			tmp--;
			if (tmp<d) d=tmp;
			if (card[tmp]==0) b++;
			card[tmp]++;
			if (card[tmp]>a) a=card[tmp];
		}
		if (b==0) break;
		switch (b){
		case 2: 
			if (a==4) p=6;
			else p=5;
			break;
		case 3:
			if (a==3) p=3;
			else p=2;
			break;
		case 4:
			p=1;
			break;
		case 5:
			bool f=true;
			for (int i=d; i<d+N1; i++)
				if (card[i]!=1){
					f=false;
					break;
				}
			if (!f && card[0]==1){
				f=true;
				for (int i=9; i<N2; i++)
					if (card[i]!=1){
						f=false;
						break;
					}
			}
			if (f) p=4;
			else p=0;
		}
		cout<<prize[p]<<endl;
	}
}

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){
	set<int> st;
	map<int,int> count;

	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	foreach(it,count){

	}
	if(mc==5){
		return "straight";
	}

	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 <string>
#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(){
	
	while( scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4] ) != EOF ){
		cout << checkCard() << endl;
	}
	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;

struct cards{
	int num, card;
};

int main()
{
	vector<int> card(5);
	vector<int> num;
	// num, card
	while(scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF)
	{
		sort(card.begin(), card.end());
		num.clear();

		int cnt = 1;
		for(int i = 0; i < 5; i++)
		{
			if(card[i] == 1) card[i] = 14;
		}

		for(int i = 0; i < 5; i++)
		{
			if(card[i] == card[i+1])
			{
				cnt++;
			}
			else
			{
				num.push_back(cnt);

				cnt = 1;
			}
		}

		sort(card.begin(), card.end());
		int st = card[0];
		bool straight = true;
		for(int i = 1; i < 5; i++)
		{
			if(++st != card[i])
			{

				straight = false;
				break;
			}
		}
		if(straight)
		{
			cout << "straight" << endl;
			continue;
		}

		if(num.size() == 2)
		{
			if( num[0] == 4 || num[1] == 4)
			{
				cout << "four card" << endl;
			}
			if( num[0] == 3 && num[1] == 2 || num[0] == 2 && num[1] == 3)
			{
				cout << "full house" << endl;
			}
		}
		else if(num.size() == 3)
		{
			if( num[0] == 3 || num[1] == 3 || num[2] == 3)
			{
				cout << "three card" << endl;
			}

			else if( num[0] == 2 && num[1] == 2 || num[0] == 2 && num[2] == 2 || num[1] == 2 && num[2] == 2)
			{
				cout << "two pair" << endl;
			}
		}
		else if(num.size() == 4)
		{
			cout << "one pair" << endl;
		}
		else if(num.size() == 5)
		{
			cout << "null" << endl;
		}
	}
}