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 argc, char **argv)
{
	int a[5];
	while(scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])!=EOF){
		sort(a, a+5);
		if(a[0]==a[1]&&a[0]==a[2]&&a[0]==a[3] || a[4]==a[1]&&a[4]==a[2]&&a[4]==a[3]){
			cout << "four card" << endl;
		} else if(a[0]==a[1]&&a[1]==a[2]){
			if(a[3]==a[4]){
				cout << "full house" << endl;
			} else {
				cout << "three card" << endl;
			}
		} else if(a[4]==a[3]&&a[2]==a[4]){
			if(a[0]==a[1]){
				cout << "full house" << endl;
			} else {
				cout << "three card" << endl;
			}
		} else if(a[1]==a[2]&&a[1]==a[3]){
			cout << "three card" << endl;
		} else if(a[0]==a[1]&&(a[2]==a[3]||a[3]==a[4])){
			cout << "two pair" << endl;
		} else if(a[1]==a[2] && a[3]==a[4]){
			cout << "two pair" << endl;
		} else if(a[0]==a[1]||a[1]==a[2]||a[2]==a[3]||a[3]==a[4]){
			cout << "one pair" << endl;
		} else if(a[0]==1&&a[1]==10&&a[2]==11&&a[3]==12&&a[4]==13){
			cout << "straight" << endl;
		} else if(a[0]+1==a[1]&&a[0]+2==a[2]&&a[0]+3==a[3]&&a[0]+4==a[4]){
			cout << "straight" << endl;
		} else {
			cout << "null" << endl;
		}
	}
	return 0;
}

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

int str(int a[5], int n){
	int tmp = a[n], i;
	for(i = 0;i < 4 && ++tmp == a[++n];i++){if(tmp == 13 && i == 2)tmp = 0, n = -1;}
	if(i == 4)return 1;
	else return 0;
}

int main(){
	string s[]={"one pair","two pair","three card","straight","full house","four card","null"};
	int a[5], t[13], ans;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		ans = -1;
		sort(a, a+5);
		for(int i = 0;i < 13;i++)t[i] = count(a, a+5,i+1);
		
		int th = 0, tw = 0, fo = 0;
		for(int i = 0;i < 13;i++){
			if(t[i] == 2)tw = 1;
			if(t[i] == 3)th = 1;
			if(t[i] == 4)fo = 1;
		}
		if(tw && th)ans = 4;
		if(fo)ans = 5;
		
		if(ans == -1 && (str(a, 0) || str(a, 1)))ans = 3;
		
		for(int i = 0;ans == -1 && i < 13;i++){
			if(t[i] == 3)ans = 2;
			if(ans == 0 && t[i] == 2)ans = 1;
			if(ans == -1 && t[i] == 2)ans = 0;
		}
		
		
		if(ans == -1)ans = 6;
		
		
		cout << s[ans] << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<string.h>
#include<algorithm>
using namespace std;

int main(){
    int a[5];
    char c;
    while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
        sort(a,a+5);
        int c[5],j=0;
        memset(c,0,sizeof(c));
        for(int i=0;i<4;i++){
            if(a[i+1]!=a[i])
                j++;
            if(a[i+1]==a[i]){
                c[j]++;
            }
        }
        int p=0,t=0,f=0;
        for(int i=0;i<5;i++){
            if(c[i]==1)p++;
            if(c[i]==2)t++;
            if(c[i]==3)f++;
        }
        if(p==2){
            cout<<"two pair"<<endl;
        }
        else if(p==1&&t==1)
            cout<<"full house"<<endl;
        else if(t==1)
            cout<<"three card"<<endl;
        else if(f==1)
            cout<<"four card"<<endl;
        else if(p==1){
            cout<<"one pair"<<endl;
        }
        else if((a[3]==a[4]-1)&&(a[1]==a[2]-1)&&(a[2]==a[3]-1)&&((a[0]==a[1]-1)||(a[4]==13&&a[0]==1)))
            cout<<"straight"<<endl;
        else cout<<"null"<<endl;
    }
}

C++: #include <stdio.h>

#define ACE 14
int is4card(int cnt[]);
int isFullHouse(int cnt[]);
int isStraight(int cnt[]);
int is3card(int cnt[]);
int is2pair(int cnt[]);
int is1pair(int cnt[]);

int main(void){
    int c[5];
    int count[ACE+1];
    
    while (scanf("%d,%d,%d,%d,%d", c+0, c+1, c+2, c+3, c+4) != EOF){
        for (int i=2; i<=ACE; i++) count[i]=0;
        for (int i=0; i<5; i++){
            if (c[i]==1) c[i]=ACE;
            count[c[i]]++;
        }
        for (int i=2; i<=ACE; i++) printf("%d ",count[i]);
        printf("\n");
        
        if (is4card(count)) printf("four card\n");
        else if (isFullHouse(count)) printf("full house\n");
        else if (isStraight(count)) printf("straight\n");
        else if (is3card(count)) printf("three card\n");
        else if (is2pair(count)) printf("two pair\n");
        else if (is1pair(count)) printf("one pair\n");
        else printf("null\n");
    }
    return 0;
}

int is4card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 4) return 1;
    }
    return 0;
}

int isFullHouse(int cnt[]){
    return is3card(cnt) && is1pair(cnt);
}

int isStraight(int cnt[]){
    int len=0;
    
    for (int i=2; i<=ACE; i++){
        if (cnt[i]==0) len=0;
        else {
            len++;
            if (len==5) return 1;
        }
    }
    return 0;
}

int is3card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 3) return 1;
    }
    return 0;
}

int is2pair(int cnt[]){
    int i,j;
    // find the first pair
    for (i=2; i<=ACE; i++){
        if (cnt[i] == 2) break;
    }
    if (i>ACE) return 0;
    // find second pair
    for (j=2; j<=ACE; j++){
        if (i==j) continue;
        if (cnt[j] == 2) return 1;
    }
    return 0;
}

int is1pair(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 2) return 1;
    }
    return 0;
}