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 nPair(int *card);
bool isThreeCard(int *card);
bool isStraight(int *card);
bool isFullHouse(int *card);
bool isFourCard(int *card);

int main()
{
	int card[5] = {0};
	char c;

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

		if (isFourCard(card))
			cout << "four card" << endl;
		else if (isFullHouse(card))
			cout << "full house" << endl;
		else if (isStraight(card))
			cout << "straight" << endl;
		else if (isThreeCard(card))
			cout << "three card" << endl;
		else if (nPair(card) == 2)
			cout << "two pair" << endl;
		else if (nPair(card) == 1)
			cout << "one pair" << endl;
		else
			cout << "null" << endl;
	}
	return 0;
}

int nPair(int *card)
{
	int c[13] = {0}, i, n = 0;

	for (i = 0; i < 5; i++)
		c[card[i] - 1]++;

	sort(c, c+13, greater<int>());

	for (i = 0; i < 5; i++)
		if (c[i] == 2)
			n++;
	return n;
}

bool isThreeCard(int *card)
{
	int c[13] = {0}, i;

	for (i = 0; i < 5; i++)
		c[card[i] - 1]++;

	sort(c, c+13, greater<int>());

	for (i = 0; i < 5; i++)
	{
		if (c[i] == 3)
			return true;
	}
	return false;
}

bool isFourCard(int *card)
{
	int c[13] = {0}, i;

	for (i = 0; i < 5; i++)
		c[card[i] - 1]++;

	sort(c, c+13, greater<int>());

	for (i = 0; i < 5; i++)
	{
		if (c[i] == 4)
			return true;
	}
	return false;
}

bool isStraight(int *card)
{
	int c[13] = {0}, i;
	bool b = true, d;

	for (i = 0; i < 5; i++)
		c[card[i] - 1]++;

	if (c[1] == 1 && c[12] == 1)
		return false;

	for (i = 1; i < 13; i++)
		if (c[i] == 1 && b)
			b = true;
		else
		{
			b = false;
			break;
		}

	sort(c, c+13, greater<int>());
	
	if (b == true)
	{
		for (i = 0; i < 5; i++)
		{
			if (c[i] == 1)
				d = true;
			else
				d = false;
		}
	}
	else
	{
		return false;
	}
	if (b == true)
		return true;
	return false;
}

bool isFullHouse(int *card)
{
	int c[13] = {0}, i;

	for (i = 0; i < 5; i++)
		c[card[i] - 1]++;

	sort(c, c+13, greater<int>());
	
	if (c[0] == 3 && c[1] == 2)
		return true;
	else
		return false;
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int l[5];
	char c;
	while (cin >> l[0] >> c >> l[1] >> c >> l[2] >> c >> l[3] >> c >> l[4]) {
		sort(l, l + 5);
		if (l[0] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[4] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[0] == l[1] && l[1] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[0] == l[1] && l[3] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[4] == l[3] + 1 && l[3] == l[2] + 1 && l[2] == l[1] + 1 && l[1] == l[0] + 1)
			cout << "straight";
		else if (l[0] == 1 && l[1] == 10 && l[2] == 11 && l[3] == 12 && l[4] == 13)
			cout << "straight";
		else if (l[0] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[4] && l[3] == l[2])
			cout << "three card";
		else if (l[0] == l[1] && l[2] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[2] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] || l[1] == l[2] || l[2] == l[3] || l[3] == l[4])
			cout << "one pair";
		else cout << "null";
		cout << endl;
	}
}

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

int main(){
    vector<int> a(5);
    while(~scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])){
	sort(a.begin(), a.end());
	if(count(a.begin(), a.end(), a[3]) == 4){
	    cout << "four card" << endl;
	}
	else if(count(a.begin(), a.end(), a[0]) + count(a.begin(), a.end(), a[4]) == 5){
	    cout << "full house" << endl;
	}
	else if(count(a.begin(), a.end(), a[3]) == 3){
	    cout << "three card" << endl;
	}
	else if(count(a.begin(), a.end(), a[1]) + count(a.begin(), a.end(), a[3]) == 4){
	    cout << "two pair" << endl;
	}
	else{
	    
	    for(int i = 0;i < 5;i++){
		if(count(a.begin(), a.end(), a[i]) == 2){
		    cout << "one pair" << endl;
		    goto done;
		}
	    }
	    if(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13){
		cout << "straight" << endl;
		goto done;
	    }
	    for(int i = 0;i < 5;i++){
		if(a[i] != a[0] + i)break;
		if(i == 4){
		    cout << "straight" << endl;
		    goto done;
		}
	    }
	    cout << "null" << endl;
	}
    done :;
    }
}