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 <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	for(int a[5];cin>>a[0];){
		repi(i,1,5)
			scanf(",%d",a+i);
		sort(a,a+5);
		
		int hist[13]={0};
		rep(i,5)
			hist[a[i]-1]++;
		sort(hist,hist+13,greater<int>());
		
		string res;
		if(hist[0]==4)
			res="four card";
		else if(hist[0]==3 && hist[1]==2)
			res="full house";
		else if(a[0]+1==a[1] && a[1]+1==a[2] && a[2]+1==a[3]&& a[3]+1==a[4] ||
				a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13)
			res="straight";
		else if(hist[0]==3)
			res="three card";
		else if(hist[0]==2 && hist[1]==2)
			res="two pair";
		else if(hist[0]==2)
			res="one pair";
		else
			res="null";
		
		cout<<res<<endl;
	}
	
	return 0;
}

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

#define rep(i,n) for(int i = 0; i < n; i++)

bool is_onepair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
	if(count == 1){
		return true;
	}
	
}

bool is_twopair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
		if(count == 2){
			return true;
		}
}

bool is_threecard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 3) return true;
	}
}

bool is_straight(int numbers[], map<int,int> freq, int count){

	if(numbers[0] == 11 || numbers[0] == 12 || numbers[0] == 13) return false;

	if(((numbers[0]+1 == numbers[1]) || (numbers[0]+9 == numbers[1])) && numbers[1] + 1 == numbers[2] && numbers[2] + 1 == numbers[3] && numbers[3] + 1 == numbers[4] ) return true;
	return false;
}

bool is_fullhouse(int numbers[], map<int,int> freq, int count){
	count = 0;
	int cnt1 = 0, cnt2 = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			cnt1++;
		}
		if(freq[i] == 3){
			cnt2++;
		}
	}
		if(cnt1 == 1 && cnt2 == 1){
			return true;
		}
		return false;
}

bool is_fourcard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 4){
			count++;
		}
	}
		if(count == 1){
			return true;
		}
		 return false;
}

int main(){
	int numbers[5];
	map<int,int> freq;
	int count = 0;

	
	while(~scanf("%d,%d,%d,%d,%d",&numbers[0],&numbers[1],&numbers[2],&numbers[3],&numbers[4])){

		sort(numbers,numbers+5);

		if(is_fullhouse(numbers, freq, count)) cout << "full house" << endl;
		else if(is_onepair(numbers, freq, count)) cout << "one pair" << endl;
		else if(is_twopair(numbers, freq, count)) cout << "two pair" << endl;		
		else if(is_threecard(numbers, freq, count)) cout << "three card" << endl;
		else if(is_straight(numbers, freq, count)) cout << "straight" << endl;

		else if(is_fourcard(numbers, freq, count)) cout << "four card" << endl;
		else cout << "null" << endl;
	}
}

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

int a, b, c, d, e;
int cnt[13];

int main()
{
	while( scanf( "%d,%d,%d,%d,%d", &a, &b, &c, &d, &e ) != EOF )
	{
		memset( cnt, 0, sizeof( cnt ) );
		cnt[a-1]++, cnt[b-1]++, cnt[c-1]++, cnt[d-1]++, cnt[e-1]++;

		if( std::find( cnt, cnt + 13, 4 ) != cnt + 13 )
			std::cout << "four card" << std::endl;
		else if( std::find( cnt, cnt + 13, 3 ) != cnt + 13 && std::find( cnt, cnt + 13, 2 ) != cnt + 13 )
			std::cout << "full house" << std::endl;
		else if( std::find( cnt, cnt + 13, 3 ) != cnt + 13 )
			std::cout << "three card" << std::endl;
		else if( std::count( cnt, cnt + 13, 2 ) == 2 )
			std::cout << "two pair" << std::endl;
		else if( std::count( cnt, cnt + 13, 2 ) == 1 )
			std::cout << "one pair" << std::endl;
		else
		{
			bool f = false;

			for( int i = 0; i < 10; i++ )
			{
				if( cnt[i] && cnt[i+1] && cnt[i+2] && cnt[i+3] && cnt[(i+4)%13] )
				{
					std::cout << "straight" << std::endl;
					f = true;
				}
			}
					
			if( !f )
				std::cout << "null" << std::endl;
	 	}
	}

	return 0;
}

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

int main(){
    int card[5];
    
    while(scanf("%d" ,&card[0])!=EOF){
        for(int i = 1 ; i < 5 ; i++){
            scanf(",%d" ,&card[i]);
        }
        
        int cnt = 0;
        for(int i = 0 ; i < 5 ; i++){
            for(int j = 0 ; j < 5 ; j++){
                if(card[i] == card[j] && i != j) cnt++;
                
            }
        }
        
        int flg = 0;
        switch(cnt){
            case 2:
                printf("one pair\n");
                flg = 2;
                break;
            case 4:
                printf("two pair\n");
                flg = 2;
                break;
            case 6:
                printf("three card\n");
                flg = 2;
                break;
            case 8:
                printf("full house\n");
                flg = 2;
                break;
            case 12:
                printf("four card\n");
                flg = 2;
                break;
            default:
                flg = 1;
        }
        
        if(flg == 2) continue;
        
        int ct=0;
        if(flg){
            sort(card,card+5);
            for(int i = 1 ; i < 5 ; i++){
                if(card[i]-card[i-1]==1) ct++;
            }
        }
        
        if(ct==4) printf("straight\n");
        else if(card[0]==1&&card[1]==10&&card[2]==11&&card[3]==12&&card[4]==13) printf("straight\n");
        else printf("null\n");
    }

    return 0;
}