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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(1){
		int card[13] = {}; // A ~ 13
		int data[5] = {};

		char c0;
		for(int i = 0; i < 5; ++i){
			if(i != 0) cin >> c0;
			cin >> data[i];
			++card[data[i] - 1];
		}

		if(cin.eof()) break;

		sort(card, card + 13, greater<int>());
		/*
		for(int i = 0; i < 13; ++i){
			cout << card[i] << " ";
		}
		cout << endl;
		*/
		switch(card[0]){
			case 4 :
				cout << "four card" << endl;
				break;

			case 3 :
				if(card[1] == 2)
					cout << "full house" << endl;
				else
					cout << "three card" << endl;
				break;

			case 2 :
				if(card[1] == 2)
					cout << "two pair" << endl;
				else
					cout << "one pair" << endl;
				break;

			default :
				sort(data, data + 5);
				if((data[0] == 1 && data[1] == 10 && data[4] == 13) || (data[0] + 4 == data[4]))
					cout << "straight" << endl;
				else
					cout << "null" << endl;
				break;
		}
	}
	return 0;
}

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

using namespace std;
int main(void)
{
	int card[5];
	char kari;
	while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				else if(check[i] == 3) three++;
				else if(check[i] >= 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(three == 1) printf("full house\n");
			else if(pair == 2) printf("two pair\n");
			else printf("one pair\n");
		}
		else if(three >= 1)
		{
			if(pair == 1) printf("full house\n");
			else if(three == 2) printf("hull house\n");
			else printf("three card\n");
		}
		else if(four >= 1) printf("four card\n");
		else if(st != 1) printf("null\n");
	}
	kitune:
	return 0;
}

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

using namespace std;

int card[5], ccount[13] = {0};

int checkHand();
int checkOnePair();
int checkTwoPair();
int checkThreeCard();
int checkStraight();
int checkFullHouse();
int checkFourCard();

int main() {
	char c;

	while (1) {
		cin >> card[0];
		if (cin.eof())	break;
		cin >> c >> card[1] >> c >> card[2] >> c >> card[3] >> c >> card[4];

		switch (checkHand()) {
		case 0:
			cout << "null" << endl;
			break;
		case 1:
			cout << "four card" << endl;
			break;
		case 2:
			cout << "full house" << endl;
			break;
		case 3:
			cout << "straight" << endl;
			break;
		case 4:
			cout << "three card" << endl;
			break;
		case 5:
			cout << "two pair" << endl;
			break;
		case 6:
			cout << "one pair" << endl;
			break;
		}

		for (int i = 0; i < 13; i++) {
			ccount[i] = 0;
		}
	}

	return 0;
} 

int checkHand() {
	int result = 0;

	stable_sort(card, card+4);

	for (int i = 0; i < 5; i++) {
		ccount[card[i] - 1]++;
	}

	if (checkOnePair() == 1)	result = 6;
	if (checkTwoPair() == 1)	result = 5;
	if (checkThreeCard() == 1)	result = 4;
	if (checkStraight() == 1)	result = 3;
	if (checkFullHouse() == 1)	result = 2;
	if (checkFourCard() == 1)	result = 1;

	return result;
}

int checkOnePair() {
	for (int i = 0; i < 13; i++){
		if (ccount[i] == 2)	return 1;
	}

	return 0;
}
int checkTwoPair() {
	int cont = 0;
	for (int i = 0; i < 13; i++){
		if (ccount[i] == 2)	cont++;
		if (cont == 2)		return 1;
	}

	return 0;
}
int checkThreeCard() {
	for (int i = 0; i < 13; i++){
		if (ccount[i] == 3)	return 1;
	}

	return 0;
}
int checkStraight() {
	int result = 1;

	if (card[0] >= 11)	return 0;

	if (card[0] == 1) {
		for (int i = 1, j = 10; i < 5; i++, j++) {
			if (card[i] != j) {
				return 0;
			}
		}
	}
	else {
		for (int i = 1, j = card[0] + 1; i < 5; i++, j++) {
			if (card[i] != j) {
				result = 0;
				break;
			}
			if (j == 13){
				j = 0;
			}
		}
	}

	return result;
}
int checkFullHouse() {
	if (checkOnePair() == 1 && checkThreeCard() == 1)
		return 1;
	else
		return 0;
}
int checkFourCard() {
	for (int i = 0; i < 13; i++) {
		if (ccount[i] == 4) {
			return 1;
		}
	}

	return 0;
}

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

int main(void)
{
    int card[5];
    
    while (scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF){
        
        stable_sort(card, card + 5);
        
        if (((card[0] == card[1]) && (card[1] == card[2]) && (card[2] == card[3])) || ((card[1] == card[2]) && (card[2] == card[3]) && (card[3] == card[4]))){
            printf("four card\n");
        }
        else if (((card[0] == card[1]) && (card[2] == card[3]) && (card[3] == card[4])) || ( (card[4] == card[3]) && (card[0] == card[1]) && (card[1] == card[2]) )){
            printf("full house\n");
        }
        else if (((card[0] == 1) && (card[1] == 10) && (card[2] == 11) && (card[3] == 12) && (card[4] == 13)) || ((card[0] == card[1] - 1) && (card[1] == card[2] - 1) && (card[2] == card[3] - 1) && (card[3] == card[4] - 1))){
            printf("straight\n");
        }
        else if ( ((card[0] == card[1]) && (card[1] == card[2])) || ((card[1] == card[2]) && (card[2] == card[3])) || ((card[2] == card[3]) && (card[3] == card[4])) ){
            printf("three card\n");
        }
        else if (((card[0] == card[1]) && (card[2] == card[3])) || ((card[1] == card[2]) && (card[3] == card[4])) || ((card[0] == card[1]) && (card[3] == card[4]))){
            printf("two pair\n");
        }
        else if ((card[0] == card[1]) || (card[1] == card[2]) || (card[2] == card[3]) || (card[3] == card[4])){
            printf("one pair\n");
        }
        else {
            printf("null\n");
        }
    }
    
    return (0);
}