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

int main(){
	int a[5],c[5]={0};
	int i;
	char x;
	while(cin>>a[0]){
		if(a[0]==1)a[0]+=13;
		for(i=1;i<5;i++){
			cin>>x>>a[i];
			if(a[i]==1)a[i]+=13;
			}
		
		c[0]=c[1]=c[2]=c[3]=0;
		sort(&a[0],&a[5]);
			
		for(i=0;i<5;i++)
			if(a[i]==a[i+1])c[0]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[1]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[2]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[3]++; else break;
			
		if(c[0]==0&&c[1]==0&&c[2]==0&&c[3]==0)
			for(i=0;i<4;i++)if(a[i]+1==a[i+1])c[4]=1; else {c[4]=0;break;}
		
		sort(c,c+4,greater<int>());
		if(c[0]==2&&c[1]==1)cout<<"full house";
		else if(c[0]==1&&c[1]==1)cout<<"two pair";
		else if(c[0]==1)cout<<"one pair";
		else if(c[0]==2)cout<<"three card";
		else if(c[0]==3)cout<<"four card";
		else if(c[0]==4)cout<<"five card";
		else if(c[4]==1)cout<<"straight";
		else cout<<"null";
		cout<<endl;
		
	}



}

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

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

int main() {
	int A, B, C, D, E; char CH;
	while (cin >> A >> CH >> B >> CH >> C >> CH >> D >> CH >> E) {
		VI a = { A,B,C,D,E };
		VI cnt(9);
		SORT(a);
		int i = 0;
		while (i < 5) {
			int elem = a[i], Cnt = 0;
			while (i < 5 && a[i] == elem) { Cnt++; i++; }
			cnt[Cnt]++;
		}

		//check
		int ans = -1;
		if (cnt[4] == 1)ans = 7;
		else if (cnt[3] == 1 && cnt[2] == 1)ans = 6;
		else {
			bool flag = false;
			if (a[0] + 1 == a[1] && a[1] + 1 == a[2] && a[2] + 1 == a[3] && a[3] + 1 == a[4])flag = true;
			else if (a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13)flag = true;
			if (flag)ans = 5;
		}

		if (ans == -1) {
			if (cnt[3] == 1)ans = 4;
			else if (cnt[2] == 2)ans = 3;
			else if (cnt[2] == 1)ans = 2;
			else ans = 1;
		}

		string str;
		switch (ans) {
		case 1:
			str = "null";
			break;
		case 2:
			str = "one pair";
			break;
		case 3:
			str = "two pair";
			break;
		case 4:
			str = "three card";
			break;
		case 5:
			str = "straight";
			break;
		case 6:
			str = "full house";
			break;
		case 7:
			str = "four card";
			break;
		}

		cout << str << endl;
	}
}

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

int hist[14+1];
int group[4+1];
int cont;

bool fourofakind() { return group[4] == 1; }
bool fullhouse() { return (group[2] == 1 && group[3] == 1); }
bool straight() { return cont == 5; }
bool threeofakind() { return group[3] == 1; }
bool twopair() { return group[2] == 2; }
bool onepair() { return group[2] == 1; }

int main() {
	int k;
	while (scanf("%d", &k) == 1) {
		for (int i = 1; i <= 14; i++) hist[i] = 0;
		for (int i = 0; i <= 4; i++) group[i] = 0;
		cont = 0;
		for (int i = 0; i < 5; i++, scanf(",%d", &k)) {
			hist[k]++;
			if (k == 1) hist[14]++;
		}
		for (int i = 1; i <= 13; i++)
			group[hist[i]]++;
		int c = 0;
		for (int i = 1; i <= 14; i++) {
			if (hist[i] == 1) {
				c++;
				if (c > cont) cont = c;
			} else
				c = 0;
		}

		if (fourofakind()) cout << "four card";
		else if (fullhouse()) cout << "full house";
		else if (straight()) cout << "straight";
		else if (threeofakind()) cout << "three card";
		else if (twopair()) cout << "two pair";
		else if (onepair()) cout << "one pair";
		else cout << "null";
		cout << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main(void){
	int hand[5];
	int cut_i,cut_j,tem;

	scanf("%d",&hand[0]);
	for(cut_i=1;cut_i<5;cut_i++){
		scanf(",%d",&hand[cut_i]);
	}

	for(cut_i=0;cut_i<4;cut_i++){
		for(cut_j=cut_i;cut_j<5;cut_j++){
			if(hand[cut_i]>hand[cut_j]){
				tem = hand[cut_i];
				hand[cut_i] = hand[cut_j];
				hand[cut_j] = tem;
			}
		}
	}

	if((hand[0] == hand[3]) || ( hand[1] == hand[4])){
		printf("four card\n");
	}
	else if((hand[0] == hand[1] && hand[2] == hand[4]) ||(hand[0] == hand[2] && hand[3] == hand[4])){
		printf("full house\n");
	}
	else if((hand[1]+1 == hand[2]) && (hand[2]+1 == hand[3]) && (hand[3]+1 == hand[4]) &&(((hand[0] ==1) && (hand[4] == 13))||(hand[0]+1 == hand[1]))){
		printf("straight\n");	
	}
	else if((hand[2] == hand[4]) ||(hand[0] == hand[2])){
		printf("three card\n");
	}
	else if( ( ( (hand[0] == hand[1]) && ( (hand[2] == hand[3]) || (hand[3] == hand[4]) ))) ||
		( (hand[1] == hand[2]) &&(hand[3] == hand[4]) ) ){
			printf("two pair\n");
	}
	else if((hand[0] == hand[1]) ||(hand[1] == hand[2])||(hand[2] == hand[3])||(hand[3] == hand[4])){
		printf("one pair\n");
	}
	else {
		printf("null\n");
	}
	return 0;
}

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

int main(){
int n[6]={};
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;}
}

for(int i=0;i<3;i++){
if(n[i+1]!=(n[i]+1))f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc==1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2||cc==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");
else printf("null\n");

c=0,cc=0;f=true;
}
return 0;
}