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()
{
    const int N = 5;
    while(1)
    {
        int hand[N];
        char x;
        int j;
        for(int i = 0; i < N; i++)
        {
            if(i)
                cin >> x;
            cin >> hand[i];
        }
        if(!cin)
            break;
 
        sort(hand, hand+N);
 
        if(hand[0] == hand[3] ||
            hand[1] == hand[4])
            cout << "four card" << endl;
        else if( (hand[0] == hand[1] && hand[2] == hand[4]) ||
                (hand[0] == hand[2] && hand[3] == hand[4]) )
            cout << "full house" << endl;
        else if( (hand[0] == 1 && hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13) ||
            (hand[0]+1==hand[1] && hand[1]+1==hand[2] && hand[2]+1==hand[3] && hand[3]+1==hand[4]) )
            cout << "straight" << endl;
        else if( (hand[0] == hand[2] || hand[1] == hand[3] || hand[2] == hand[4]) )
            cout << "three card" << endl;
        else if( (hand[0]==hand[1] && hand[2]==hand[3]) ||
                (hand[0]==hand[1] && hand[3]==hand[4]) ||
                (hand[1]==hand[2] && hand[3]==hand[4]) )
            cout << "two pair" << endl;
        else if( hand[0]==hand[1] || hand[1]==hand[2] || hand[2]==hand[3] || hand[3]==hand[4] )
            cout << "one pair" << endl;
       
    }
    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;
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(1){
		int card[100] = {}; // A ~ 13
		int data[100] = {};

		char c0;
		for(int i = 0; i < 5; ++i){
			if(i != 0) cin >> c0;
			cin >> data[i];
			++card[data[i] - 1];
		}

		if(cin.eof()) break;

		sort(card, card + 13, greater<int>());
		/*
		for(int i = 0; i < 13; ++i){
			cout << card[i] << " ";
		}
		cout << endl;
		*/
		switch(card[0]){
			case 4 :
				cout << "four card" << endl;
				break;

			case 3 :
				if(card[1] == 2)
					cout << "full house" << endl;
				else
					cout << "three card" << endl;
				break;

			case 2 :
				if(card[1] == 2)
					cout << "two pair" << endl;
				else
					cout << "one pair" << endl;
				break;

			default :
				sort(data, data + 5);
				bool check = true;
				if(data[4] == 13) data[0] = 9;
				for(int i = 0; i < 5; ++i){
					if(data[0] + i != data[i]){
						check = false;
						break;
					}
				}
				if(check)
					cout << "straight" << endl;
				else
					cout << "null" << endl;
				break;
		}
	}
	return 0;
}

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

int main() {
  int n[5],k[15],m[15],i,y=0;
  char c[7][11]={"null","one pair","two pair","three card","four card","full house","straight"};
  while (scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF) {
  for (i=0;i<15;i++) { m[i]=0; k[i]=0;}
  for (i=0;i<5;i++) k[n[i]]++;
  for (i=1;i<14;i++) if (k[i]>0) m[k[i]]++;
  y=0; k[14]=k[1];
  if (m[2]>0) y=m[2];
  if (m[3]==1) if (m[2]==1) y=5; else y=3;
  if (m[4]==1) y=4;
  for (i=1;i<11;i++) if (k[i]==1 && k[i+1]==1 && k[i+2]==1 && k[i+3]==1 && k[i+4]==1) y=6; 
  cout << c[y] << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<string.h>
#include<algorithm>

using namespace std;

int main(void){
	
	string yaku[]={"one pair","two pair","three card","full house","four card","straight","null"};
	int tefuda[5],count[14];
	bool flag,straight;

	while(scanf("%d,%d,%d,%d,%d",&tefuda[0],&tefuda[1],&tefuda[2],&tefuda[3],&tefuda[4])!=EOF){
		
		flag=true;
		straight=true;
		
		memset(count,0,sizeof(count));
		//sort
		sort(tefuda,tefuda+5);
		//1-4 pair or fullhouse 
		for(int i=0;i<4;i++){
			for(int j=i+1;j<5;j++){
				if(tefuda[i]==tefuda[j]){
					count[tefuda[i]]++;
					flag=false;
				}	
			}
		}
		

		//straight
		if(flag){
			if(tefuda[0]==1 && tefuda[1]==2){
				for(int i=2;i<5;i++){
					if(tefuda[i]!=i+1){
						straight=false;
					}
				}
			}
			else if(tefuda[0]==1 && tefuda[4]==13){
				for(int i=1;i<4;i++){
					if(tefuda[i]!=i+9){
						straight=false;
					}
				}
			}
			else{
				for(int i=tefuda[0];i<5+tefuda[0];i++){
					if(tefuda[i-tefuda[0]]!=i){
						straight=false;
					}
				}	
			}
			
			if(straight){
				cout<<yaku[5]<<endl;	//straight
				//break;
			}
			else{
				cout<<yaku[6]<<endl;	//null
				//break;
			}
		}
		else{
			sort(count,count+14);
			if(count[13]==6){
				cout<<yaku[4]<<endl;
			}else if(count[12]==1 && count[13]==3){
				cout<<yaku[3]<<endl;
			}else if(count[12]==0 && count[13]==3){
				cout<<yaku[2]<<endl;
			}else if(count[12]==count[13]){
				cout<<yaku[1]<<endl;
			}else if(count[12]<2 && count[13]==1){
				cout<<yaku[0]<<endl;
			}
		}

	}
}