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 <string>
using namespace std;
int main(){
	int card[5]; char ch;
	while(cin>>card[0]>>ch>>card[1]>>ch>>card[2]>>ch>>card[3]>>ch>>card[4]){
	int num[13]={0};
	for(int i=0;i<5;i++) num[card[i]-1]++;
	string ans="null";
	int pair=0;
	for(int i=0;i<13;i++){
		if(num[i]==2 && pair==0 && ans!="three card") ans="one pair",pair++;
		else if(num[i]==2 && pair==1 && ans!="three card") ans="two pair",pair++;
		else if(num[i]==3) ans="three card";
		else if(num[i]==4) ans="four cards";
	};
	if(ans=="three card" && pair==1) ans="full house";
	if(ans=="null") do{
		int flag=0;
		for(int i=0;i<=9;i++){
			if(flag==0 && num[i]==1) flag=1;
			if(flag==1 && num[i+1]==1&& num[i+2]==1 && num[i+3]==1 && num[i+4]==1) ans="straight";
		};
		if(num[9]==1&&num[10]==1&&num[11]==1&&num[12]==1&&num[0]==1) ans="straight";
	}while(0);
	cout << ans << '\n' ;
	};
}

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

string pairs[2][3] = { {"null","one pair","two pair"},
					  {"three card","full house",""} };

int main() {
	int n, c, three, two;
	char t;
	string res;
	while (true) {
		int card[13] = { 0 }, c = 0, three = 0, two = 0;
		for (int i = 0; i < 4; i++) {
			cin >> n >> t;
			card[n - 1]++;
		}
		cin >> n;
		card[n - 1]++;

		for (int i = 0; i < 13; i++) {
			if (card[i] == 4) {
				c = 114514;
				break;
			} else if(card[i] == 3) {
				three++;
			} else if(card[i] == 2) {
				two++;
			}

			if (card[i] == 1) {
				c++;

				if (c == 4 && i == 12 && card[0] == 1) {
					c = 5;
					break;
				}
			} else if(card[i] == 0 && c != 5 && c > 0) {
				c = 0;
			}
		}
		if (c == 5) {
			cout << "straight" << endl;
		} else if (c == 114514) {
			cout << "four card" << endl;
		} else {
			cout << pairs[three][two] << endl;
		}
		
		if (!cin) break;
	}

	return 0;
}

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

using namespace std;

void sort(int card[5])
{
	for(int i=0;i<5;i++)
	{
		int max=i;
		for(int j=i+1;j<5;j++)
		{
			if(card[max]<card[j])
			{
				max=j;
			}
		}
		int tmp=card[i];
		card[i]=card[max];
		card[max]=tmp;
	}
}

bool fourcard(int 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]))
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool fullhouse(int card[5])
{
	if((card[0]==card[1]&&card[2]==card[3]&&card[3]==card[4])||
		(card[0]==card[1]&&card[1]==card[2]&&card[3]==card[4]))
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool straight(int card[5])
{
	if((card[0]-1==card[1]&&card[1]-1==card[2]&&card[2]-1==card[3]&&card[3]-1==card[4])||
		(card[0]==13&&card[1]==12&&card[2]==11&&card[3]==10&&card[4]==1))
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool threecard(int card[5])
{
	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]))
	{
		return true;
	}
	else{
		return false;
	}
}

bool twopair(int card[5])
{
	if((card[0]==card[1]&&card[2]==card[3])||
		(card[0]==card[1]&&card[3]==card[4])||
		(card[1]==card[2]&&card[3]==card[4]))
	{
		return true;
	}
	else return false;
}

bool onepair(int card[5])
{
	if(card[0]==card[1]||
		card[1]==card[2]||
		card[2]==card[3]||
		card[3]==card[4])
	{
		return true;
	}
	else return false;
}

char *solve(int card[5])
{
	sort(card);
	if(fourcard(card))
	{
		return "four card";
	}
	else if(fullhouse(card))
	{
		return "full house";
	}
	else if(straight(card))
	{
		return "straight";
	}
	else if(threecard(card))
	{
		return "three card";
	}
	else if(twopair(card))
	{
		return "two pair";
	}
	else if(onepair(card))
	{
		return "one pair";
	}
	else
	{
		return "null";
	}
}

int main(void)
{
	int card[5];
	char c;
	while(cin>>card[0])
	{
		for(int i=1;i<5;i++)
		{
			cin>>c>>card[i];
		}
		cout<<solve(card)<<endl;
	}
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int a[5];
int main() {
    while(~scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])) {
        sort(a, a + 5);
        if((a[0] == a[1] || a[3] == a[4]) && a[1] == a[2] && a[2] == a[3]) printf("four card\n");
        if((a[0] == a[1] && a[2] == a[3] && a[3] == a[4]) || (a[0] == a[1] && a[1] == a[2] && a[3] == a[4])) printf("full house\n");
        if(a[0] + 1 == a[1] && a[1] + 1 == a[2] && a[2] + 1 == a[3] && (a[3] + 1) % 13 == a[4] % 13) printf("straight\n");
        if(((a[0] == a[1] || a[2] == a[3]) && a[1] == a[2]) || (a[2] == a[3] && a[3] == a[4])) printf("three card\n");
        else {
            int p = 0; for(int i = 1; i < 5; i++) if(a[i - 1] == a[i]) p++;
            if(p == 2) printf("two pair\n");
            if(p == 1) printf("one pair\n");
            if(p == 0) printf("null\n");
        }
    }
    return 0;
}

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);
				bool check = true;
				if(data[4] == 13) data[0] = 9;
				for(int i = 0; i < 5; ++i){
					if(data[0] + i != data[i]){
						check = false;
						break;
					}
				}
				if(check)
					cout << "straight" << endl;
				else
					cout << "null" << endl;
				break;
		}
	}
	return 0;
}