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<queue>
#include<cstdio>
using namespace std;

int main(){
	priority_queue<int,vector<int>,greater<int> > que;
	string ss;
	int c[5];
	while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
		int dt[14];
		for(int i=0;i<14;i++){
			dt[i]=0;
		}
		for(int i=0;i<5;i++){
			que.push(c[i]);
		}
		while(!que.empty()){
			for(int i=1;i<=13;i++){
				if(que.top()==i)dt[i]++;
			}
			que.pop();
		}
		int onepair=0,threecard=0,straight=0,fourcard=0;
		for(int i=1;i<14;i++){
			if(dt[i]==2)onepair++;
			if(dt[i]==3)threecard++;
			if(dt[i]==4)fourcard++;
		}
		for(int i=5;i<14;i++){
			if(dt[i-4]==1 && dt[i-3]==1 && dt[i-2]==1 && dt[i-1]==1 &&dt[i]==1)straight++;
			if(i==13){
				if(dt[10]==1 && dt[11]==1 && dt[12]==1 && dt[13]==1 &&dt[1]==1)straight++;
			}
		}
		if(onepair==1){
			if(threecard==1)cout<<"full house"<<endl;
			else cout<<"one pair"<<endl;
		}
		else 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(fourcard==1)cout<<"four card"<<endl;
		else if(straight==1)cout<<"straight"<<endl;
		else cout<<"null"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int n[5];
    string ans;
    while(scanf("%d%*c%d%*c%d%*c%d%*c%d", &n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
        rep(i,4){
            for(int j = 4; j > i; j--){
                if(n[j] < n[j - 1]){
                    int num = n[j];
                    n[j] = n[j - 1];
                    n[j - 1] = num;
                }
            }
        }
        ans = "null";
        rep(i,4){
            if(n[i] == n[i + 1]){
                ans = "one pair";
                rep(j,4){
                    if(n[j] == n[j + 1] && n[j] != n[i]){
                        ans = "two pair";
                        break;
                    }
                }
            }
        }
        rep(i,3){
            if(n[i] == n[i + 1] && n[i] == n[i + 2]){
                ans = "three card";
                rep(j,4){
                    if(n[j] == n[j + 1] && n[j] != n[i] && n[j] != n[i + 1]){
                        ans = "full house";
                        break;
                    }
                }
            }
        }
        rep(i,2){
            if(n[i] == n[i + 1] && n[i] == n[i + 2] && n[i] == n[i + 3]){
                ans = "four card";
                break;
            }
        }
        bool c = true;
        int f = n[0];
        rep(i,5){
            if(n[i] != f + i){
                c = false;
                break;
            }
        }
        if(c) ans = "straight";
        if(n[0] == 1 && n[1] == 10 && n[2] == 11 && n[3] == 12 && n[4] == 13) ans = "straight";
        cout << ans << endl;
    }
}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int arr[6];
 
 int main()
 {
   while(cin>>arr[0])
   {
     for(int i=1;i<5;i++)
     {
       char temp;
       cin>>temp>>arr[i];        
     }                  
     sort(arr,arr+5);
     if((arr[0]==arr[1]&&arr[1]==arr[2]&&arr[2]==arr[3])||(arr[1]==arr[2]&&arr[2]==arr[3]&&arr[3]==arr[4])) cout<<"four card"<<endl;
     else if((arr[0]==arr[1]&&arr[1]==arr[2]&&arr[3]==arr[4])||(arr[0]==arr[1]&&arr[2]==arr[3]&&arr[3]==arr[4])) cout<<"full house"<<endl;
     else if((arr[0]==arr[1]&&arr[1]==arr[2])||(arr[1]==arr[2]&&arr[2]==arr[3])||(arr[2]==arr[3]&&arr[3]==arr[4])) cout<<"three card"<<endl;
     else
     {
       int count=0;
       for(int i=0;i<4;i++)
       {
         if(arr[i]==arr[i+1]) count++;        
       }    
       if(count==1) cout<<"one pair"<<endl;
       else if(count==2) cout<<"two pair"<<endl;
       else
       {
         bool flag=true;
         for(int i=0;i<4;i++)
         {
           int kk=arr[i+1]-arr[i];
           if(!(kk==1||kk==-12))
           {
             flag=false;
             break;                     
           }          
         }    
         if(flag) cout<<"straight"<<endl;
         else cout<<"null"<<endl; 
       }
     }       
   }
   //while(1);
   return 0;
 }

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void)
{
	int i;
	int t[5];
	while(scanf("%d,%d,%d,%d,%d",&t[0],&t[1],&t[2],&t[3],&t[4]) != EOF)
	{
		int j=0;
		int card[14]={0};
		int num[5]={0};
		for(i=0;i<5;i++)
		{
			card[t[i]]++;
		}
		for(i=1;i<14;i++)
		{
			num[card[i]]++;
		}
		if(num[4])
		{
			cout << "four card" << endl;
			continue;
		}
		if(num[3])
		{
			if(num[2])
			{
				cout << "full house" << endl;
				continue;
			}
			else
			{
				cout << "three card" << endl;
				continue;
			}
		}
		if(num[2]==2)
		{
			cout << "two pair" << endl;
			continue;
		}
		if(num[2])
		{
			cout << "one pair" << endl;
			continue;
		}
		for(i=1;i<11;i++)
		{
			if(card[i]&&card[i+1]&&card[i+2]&&card[i+3]&&card[(i+4)%13])
			{
				cout << "straight" << endl;
				j++;
				break;
			}
		}
		if(j==1)continue;
		cout << "null" << endl;
	}
	return 0;
}