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>
using namespace std;

void Sort( int* a )
{
    for( int i = 0; i < 4; i++ )
    {
        for( int j = i + 1; j < 5; j++ )
        {
            if( a[i] > a[j] )
            {
                int temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }
    }
}

bool fourCard( int* a )
{
    if( a[0] == a[1] && a[2] == a[3] && a[1] == a[2] || a[1] == a[2] && a[3] == a[4] && a[2] == a[3] )
        return true;
    else
        return false;
}

bool fullHouse( int* a )
{
    if( a[0] == a[1] && a[2] == a[3] && a[3] == a[4] || a[0] == a[1] && a[0] == a[2] && a[3] == a[4] )
        return true;
    else
        return false;
}

bool threeCard( int* a )
{
    if( a[0] != a[1] && a[2] == a[3] && a[3] == a[4] || a[3] != a[4] && a[0] == a[1] && a[0] == a[2] || a[0] != a[4] && a[1] == a[2] && a[2] == a[3] )
        return true;
    else
        return false;
}

bool straight( int* a )
{
    if( a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13 )
        return true;
    for( int i = 0; i < 4; i++ )
        if( a[i+1] - a[i] != 1 )
            return false;
    return true;
}

bool twoPair( int* a )
{
    if( fourCard(a) == false && ( a[0] == a[1] && a[2] == a[3] || a[0] == a[1] && a[3] == a[4] || a[1] == a[2] && a[3] == a[4] ) )
        return true;
    else
        return false;;
}

bool onePair( int * a )
{
    if( twoPair(a) == false && threeCard(a) == false && ( a[0] == a[1] || a[1] == a[2] || a[2] == a[3] || a[3] == a[4] ) )
        return true;
    else
        return false;
}

int main()
{
    int card[5];
    char p;

    while( cin >> card[0] >> p >> card[1] >> p >> card[2] >> p >> card[3] >> p >> card[4] )
    {
        Sort(card);
        if( fullHouse(card) == true )
            cout << "full house" << endl;
        else if( fourCard(card) == true )
            cout << "four card" << endl;
        else if( threeCard(card) == true )
            cout << "three card" << endl;
        else if( twoPair(card) == true )
            cout << "two pair" << endl;
        else if( onePair(card) == true )
            cout << "one pair" << endl;
        else if( straight(card) == true )
            cout << "straight" << endl;
        else
            cout << "null" << endl;
    }

    return 0;
}

C++: #include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int a[5];
    while(scanf("%d",&a[0])!=EOF){
        for(int i=1;i<5;i++)scanf(",%d",&a[i]);
        sort(a,a+5);
        if(a[0]==a[3]||a[1]==a[4])cout<<"four card"<<endl;
        else if((a[0]==a[1]&&a[3]==a[4])&&(a[1]==a[2]||a[2]==a[3]))cout<<"full house"<<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[1]+1==a[2]&&a[2]+1==a[3]&&a[3]+1==a[4])cout<<"straight"<<endl;
        else if(a[0]==a[2]||a[1]==a[3]||a[2]==a[4])cout<<"three card"<<endl;
        else{
            int cou=0;
            for(int i=0;i<4;i++){
                if(a[i]==a[i+1])cou++;
            }
            if(cou==2)cout<<"two pair"<<endl;
            else if(cou)cout<<"one pair"<<endl;
            else cout<<"null"<<endl;
        }
    }
    return 0;
}

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

bool isstraight(int c[]);

int main(){
    int card[5];

    while(~scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4])){
        sort(card, card+5);
        int n = 0;
        for(int i=0; i<4; i++){
            for(int j=i+1; j<5; j++){
                if(card[i] == card[j]){
                    n++;
                }
            }
        }

        switch(n){
            case 1:
                cout << "one pair" << endl;
                break;
            case 2:
                cout << "two pair" << endl;
                break;
            case 3:
                cout << "three card" << endl;
                break;
            case 4:
                cout << "full house" << endl;
                break;
            case 6:
                cout << "four card" << endl;
                break;
            case 10:
                cout << "four card" << endl;
                break;
            default:
                if(isstraight(card)){
                    cout << "straight" << endl;
                }else{
                    cout << "null" << endl;
                }
                break;
        }
    }

    return 0;
}

bool isstraight(int c[]){
    for(int i=1; i<9; i++){
        if(c[0]==i && c[1]==i+1 && c[2]==i+2 && c[3]==i+3 && c[4]==i+4){
            return true;
        }
        if(c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13){
            return true;
        }
    }
    return false;
}