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 card[14];
	int hand[5];
	char cm;
	while(1){
		fill(card,card+14,0);
		cin>>hand[0];
		card[hand[0]]++;
		if(cin.eof())
			break;
		for(int i = 1; i < 5; i++){
			cin>>cm>>hand[i];
			card[hand[i]]++;
		}

		int onepair=0;
		int threecard=0;
		int straight=0;

		int cont=0;
		bool f=false;

		if(card[1]==1&&card[10]==1&&card[11]==1&&card[12]==1&&card[13]==1){
			cout<<"straight"<<endl;
			continue;
		}

		for(int i = 1; i < 14; i++){
			if(card[i]==4){
				cout<<"four card"<<endl;
				f=true;
				break;
			}
			else if(card[i]==2){
				onepair++;
			}
			else if(card[i]==3){
				threecard++;
			}
			else if(card[i]==1){
				cont++;
				if(cont==5){
					straight++;
				}
			}
			else
				cont=0;
		}
		if(!f){
			if(onepair==2)
				cout<<"two pair"<<endl;
			else if(threecard==1){
				if(onepair==1)
					cout<<"full house"<<endl;
				else
					cout<<"three card"<<endl;
			}
			else if(straight){
				cout<<"straight"<<endl;
			}
			else if(onepair==1){
				cout<<"one pair"<<endl;
			}
			else
				cout<<"null"<<endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
int main(){
int x[5],i,j;
while(scanf("%d,%d,%d,%d,%d",&x[0],&x[1],&x[2],&x[3],&x[4])!=EOF){
for(j=0;j<5;j++){
for(i=0;i<4;i++){
if(x[i]>x[i+1]){
int g=x[i+1];
x[i+1]=x[i];
x[i]=g;
}}}
if(x[0]==x[1] && x[1]==x[2] && x[2]==x[3]){
printf("four card\n");
continue;
}
if(x[1]==x[2] &&x[2]==x[3]&&x[3]==x[4]){
printf("four card\n");
continue;
}
if(x[0]==x[1]&&x[1]==x[2]&&x[3]==x[4]){
printf("full house\n");
continue;
}
if(x[0]==x[1]&&x[2]==x[3]&&x[3]==x[4]){
printf("full house\n");
continue;
}
if(x[0]<=10 && x[0]+1==x[1]&&x[1]+1==x[2]&&x[2]+1==x[3]&&x[3]+1==x[4]){
printf("straight\n");
continue;
}
if(x[0]==1&&x[1]==10&&x[2]==11&&x[3]==12&&x[4]==13){
printf("straight\n");
continue;
}
if(x[0]==x[1]&&x[1]==x[2]){
printf("three card\n");
continue;
}
if(x[1]==x[2]&&x[3]==x[2]){
printf("three card\n");
continue;
}
if(x[2]==x[3]&&x[3]==x[4]){
printf("three card\n");
continue;
}
if(x[0]==x[1] && x[2]==x[3]){
printf("two pair\n");
continue;
}
if(x[0]==x[1] && x[2]==x[3]){
printf("two pair\n");
continue;
}
if(x[0]==x[1]&&x[3]==x[4]){
printf("two pair\n");
continue;
}
if(x[1]==x[2]&&x[3]==x[4]){
printf("two pair\n");
continue;
}
if(x[0]==x[1]){
printf("one pair\n");
continue;
}
if(x[2]==x[1]){
printf("one pair\n");
continue;
}
if(x[2]==x[3]){
printf("one pair\n");
continue;
}
if(x[3]==x[4]){
printf("one pair\n");
continue;
}
printf("null\n");
}
return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const string yaku[] = {"null",
		       "one pair",
		       "two pair",
		       "three card",
		       "four card",
		       "straight",
		       "full house"
};
int one(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 1)return 1;
    if(T[i] != T[i+1])cnt = 0;
  }
  return -1;
}

int two(int T[]){
  int cnt = 0,f = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 1 && f ==1)return 2;
    if(T[i]!=T[i+1]){
      cnt = 0;
      f = 1;
    }
  }
  return -1;
}

int three(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 2)return 3;
    if(T[i]!=T[i+1])cnt = 0;
  }
  return -1;
}
int four(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 3)return 4;
    if(T[i] != T[i+1])cnt = 0;
  }
  return -1;
}
int straigt(int T[]){
  int f = 1;
  int cnt = 0;
  if(T[0] == 1&&T[4] == 13){
    if(T[1] == 10 && T[2] == 11 && T[3] == 12 )f = 1;
    else f = 0;
    //    cout << f << endl;
  }else{
    for(int i = 0 ; i < 5 ; i++ ){
      //cout << T[i] <<' '<< T[0] + i << endl;
      if(T[i] != i + T[0])f = 0;
    }
  }
  if(f)return 5;
  else return -1;
}

int fullhouse(int T[]){
  int cmp1=-1,cmp2=-1;
  int cnt = 0;
  //3
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 2){
      cmp1 = T[i];
      break;
    }
    if(T[i] != T[i+1])cnt = 0;
  }
  //2
  cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 1 && T[i+1] != T[i+2]){
      cmp2 = T[i];
      break;
    }
    if(T[i] != T[i+1])cnt = 0;
  }
  if(cmp1 != cmp2 && cmp1 > 0 && cmp2 > 0)return 6;
  else return -1;
}

int main(){
  int toranpu[5];
  char c;
  while(cin >> toranpu[0]){
    int f = 0;
    for(int i = 1; i < 5 ; i++){
      cin >> c >>toranpu[i];
    }
    sort(toranpu,toranpu+5);
    //   for(int i = 0 ; i < 5 ; i++)cout << toranpu[i] << ' ';
    //    cout << endl;
    if(one(toranpu) != -1)f = one(toranpu);
    //    cout <<"f1 " <<  f << endl;
    if(two(toranpu) != -1)f = two(toranpu);
    //    cout <<"f2 " <<  f << endl;
    if(three(toranpu) != -1)f = three(toranpu);
    //   cout <<"f3 " <<  f << endl;
    if(four(toranpu) != -1)f = four(toranpu);
    //    cout <<"f4 " <<  f << endl;
    if(straigt(toranpu) != -1)f = straigt(toranpu);
    //    cout <<"f5 " <<  f << endl;
    if(fullhouse(toranpu) != -1)f = fullhouse(toranpu);
    //    cout <<"f6 " <<  f << endl;
    cout << yaku[f] << endl;
  }
  return 0;
}