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<cstdio>

int main(){
	int t;
	while(scanf("%d", &t) + 1){
		int a[14] = {};
		int b[5] = {};
		a[t]++;
		for(int i = 0; i < 4; i++){
			scanf(",%d", &t);
			a[t]++;
		}
		t = 0;
		for(int i = 1; i < 14; i++){
			if(a[i]){
				t++;
			}else{
				t = 0;
			}

			b[a[i]]++;
			if(t == 5){
				printf("straight\n");
				break;
			}
		}
		if(t == 4 && a[1]){
			printf("straight\n");
		}else{
			if(b[4]){
				printf("four card\n");
			}else if(b[3]){
				if(b[2]){
					printf("full house\n");
				}else{
					printf("three card\n");
				}
			}else if(b[2]){
				if(b[2] -1){
					printf("two pair\n");
				}else{
					printf("one pair\n");
				}
			}else{
				if(t != 5){
					printf("null\n");
				}
			}
		}
	}
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
int main(){
    string s;
    while(cin >> s){
        vector<int> in;
        int t = 0;
        for(int i = 0; i < s.size(); i++){
            if(s[i] == ','){
                in.push_back(t);
                t = 0;
                continue;
            }
            t *= 10;
            t += s[i] - '0';
        }
        in.push_back(t);
        sort(in.begin(),in.end());

        if(in[0] == in[3] || in[1] == in[4]){
            cout << "four card" << endl;
            continue;
        }
        int card[15] = {};
        for(int i = 0; i < 5; i++)card[in[i]]++;
        sort(card, card+15);
        if(card[12] == 0){
            cout << "full house" << endl;
            continue;
        }
        if(card[14] == 1 &&(in[4] - in[0] == 4 || (in[0] == 1 && in[1] == 10 && in[4] == 13))){
            cout << "straight" << endl;
            continue;
        }
        if(card[14] == 3){
            cout << "three card" << endl;
            continue;
        }
        if(card[14] == 2 && card[13] == 2){
            cout << "two pair" << endl;
            continue;
        }
        if(card[14] == 2){
            cout << "one pair" << endl;
            continue;
        }
        cout << "null" << 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==9))
           {
             flag=false;
             break;                     
           }          
         }    
         if(flag) cout<<"straight"<<endl;
         else cout<<"null"<<endl; 
       }
     }       
   }
   //while(1);
   return 0;
 }

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

using namespace std;
 
int main(){
    int A[5];
    while( cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4] ) {
        sort(A,A+5);
        if( (A[0] == A[1]) && (A[2] == A[3]) && (A[2] == A[1]) )
		cout << "four card\n";
		
        else if( (A[1] ==A[2]) && (A[3] == A[4]) && (A[3] == A[2]) )
		cout << "four card\n";
		
        else if( (A[0] == A[1]) && (A[1] == A[2]) && (A[3] == A[4]) )
		cout << "full house\n";
		
        else if( (A[0] == A[1]) && (A[2] == A[3]) && (A[3] == A[4]) )
		cout << "full house\n";
		
        else if( (A[0] == 1) && (A[1] == 10) &&(A[2] == 11)
				&& (A[3] == 12) && (A[4] == 13) )
		cout << "straight\n";
		
        else if((A[0] + 1 == A[1]) && (A[1] +1 == A[2]) && (A[2] + 1 == A[3])
				&& (A[3] + 1 == A[4]) )
		cout << "straight\n";
		
        else if
           ( ( (A[0] == A[1]) && (A[1] == A[2])) ||
             ( (A[1] == A[2]) && (A[2] == A[3])) ||
             ( (A[2] == A[3]) && (A[3] == A[4])) )
			cout << "three card\n";
			
        else if
            ( ( (A[0] == A[1]) && ((A[2] == A[3]) || (A[3] == A[4]))) ||
            ( ( A[1] == A[2]) && (A[3] == A[4])) )
			cout << "two pair\n";
			
        else if
		((A[0] == A[1]) || (A[1] == A[2]) || (A[2] == A[3]) || (A[3] == A[4]))
		cout << "one pair\n";
		
        else 
		cout << "null\n";
    }
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
    int tmp[5];
    while(scanf("%d,%d,%d,%d,%d,",&tmp[0],&tmp[1],&tmp[2],&tmp[3],&tmp[4])!= EOF){
    int hand[14]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }
   
    int pair=0,three=0,str=0,four=0;
    for(int i=1; i<14; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str == 5)cout << "straight" << endl;
    else if(three)cout << "three card" << endl;
    else if(pair == 2)cout << "two pair" << endl;
    else if(pair == 1)cout << "one pair" << endl;
    else cout << "null" << endl;
  }
}