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

int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full 

house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
for(int j=i-1;j>-1;j--){
if(s[j]<=c[i]){
for(int k=i;k>j+1;k--)s[k]=s[k-1];
s[j+1]=c[i];
break;}}
if(s[0]>c[i]){
for(int k=i;k>0;k--)s[k]=s[k-1];
s[0]=c[i];}}
if(s[0]==s[1]||s[1]==s[2]||s[3]==s[4]||s[2]==s[3])ans=1;
if((s[0]==s[1]||s[1]==s[2])&&(s[2]==s[3]||s[3]==s[4]))ans=2;
if(s[0]==s[2]||s[1]==s[3]||s[2]==s[4])ans=3;
if(s[2]+1==s[3]&&s[1]+1==s[2]&&s[3]+1==s[4]&&(s[0]+1==s[1]||(s[0]==1&&s

[4]==13)))ans=4;
if((s[0]==s[2]&&s[3]==s[4])||(s[0]==s[1]&&s[2]==s[4]))ans=5;
if(s[0]==s[3]||s[1]==s[4])ans=6;

for(int i=0;i<7;i++){if(ans==i)cout<<a[i]<<endl;}

}

}

C++: #include<stdio.h>

int main()
{
	while(1)
	{
		int card[14]={0};
		bool two=0,two2=0,three=0,four=0,strate=0;
		for(int i=0;i<5;i++)
		{
			int temp;
			if(scanf("%d,",&temp)==EOF)
				return 0;
			card[temp]++;
		}
		for(int i=1;i<14;i++)
		{
			if(card[i]==2)
			{
				if(two)
					two2=true;
				else
					two=true;
			}
			else if(card[i]==3)
				three=true;
			else if(card[i]==4)
				four=true;
			else if(i+5<14)
			{
				bool flag=false;
				for(int j=0;j<5;j++)
				{
					if(card[i+j]!=1)
					{
						flag=true;
						break;
					}
				}
				if(!flag)
					strate=true;
			}
		}
		if(four)
			printf("four card\n");
		else if(two && three)
			printf("full house\n");
		else if(card[1]==1&&card[10]==1&&card[11]==1&&card[12]==1&&card[13]==1 || strate)
			printf("straight\n");
		else if(three)
			printf("three card\n");
		else if(two && two2)
			printf("two pair\n");
		else if(two)
			printf("one pair\n");
		else
			printf("null\n");
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

int a;
vi n(5);
char t;

int main(){
	while(cin>>a){
		vi vec,tmp;
		n[0]=a;
		vec.push_back(a);
		for(int i=1;i<5;i++){
			cin>>t>>n[i];
			bool used=1;
			for(int j=0;j<vec.size();j++){
				if(n[i]==vec[j]) used=0;
			}
			if(used) vec.push_back(n[i]);
			else tmp.push_back(n[i]);
		}
		if(vec.size()==4){
			cout<<"one pair"<<endl;;
			continue;
		}
		if(vec.size()==3){
			if(tmp[0]==tmp[1]) cout<<"three card"<<endl;
			else cout<<"two pair"<<endl;
			continue;
		}
		if(vec.size()==2){
			if(tmp[0]==tmp[1]&&tmp[1]==tmp[2]) cout<<"four card"<<endl;
			else cout<<"full house"<<endl;
			continue;
		}
		sort(n.begin(),n.end());
		int tmpn=0;
		for(int i=1;i<4;i++){
			if(n[i]+1==n[i+1]) tmpn++;
		}
		if((n[0]==1&&n[1]==10)||n[0]+1==n[1]) tmpn++;
		if(tmpn==4){
			cout<<"straight"<<endl;
			continue;
		}
		cout<<"null"<<endl;
	}
}

C++: #include <cstdio>
#include <algorithm>

using namespace std;

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

C++: #include<cstdio>
#include<algorithm>

using namespace std;
int main(void)
{
	int card[6];
	char kari;
	while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			if(i!= 4) scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				if(check[i] == 3) three++;
				if(check[i] == 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(pair == 2) printf("two pair\n");
			else if(three == 1) printf("full house\n");
			else printf("one pair\n");
		}
		else if(three == 1) 
		{
			if(pair == 1) printf("full house\n");
			else printf("three card\n");
		}
		else if(four == 1) printf("fourcard\n");
		else if(st != 1) printf("null\n");
	}
	kitune:;
	return 0;
}