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 <cstdio>
#include <algorithm>

using namespace std;

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

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 (!cin.eof()) {
		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;
			continue;
		}

		if (c == 114514) {
			cout << "four card" << endl;
			continue;
		}

		cout << pairs[three][two] << endl;
	}

	return 0;
}

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

int card[13];
int solve(){
    int m;
    vector<int> n;
    for(int i=0;i<13;i++){
        if(card[i]) n.push_back(card[i]);
    }
    for(int i=0;i<n.size();i++){
        for(int j=1;j<n.size()-i;i++){
            if(n[j-1] < n[j]) swap(n[j-1], n[j]);
        }
    }
    if(n.size()==2){
        if(n[0] == 4){
            cout << "four card" << endl;
        }else{
            cout << "full house" << endl;
        }
    }else if(n.size()==3){
        if(n[0] == 3){
            cout << "three card" << endl;
        }else{
            cout << "two pair" << endl;
        }
    }else if(n.size()==4){
        cout << "one pair" << endl;
    }else{
        for(int i=0;i<13-3;i++){
            if(card[i]&&card[i+1]&&card[i+2]&&card[i+3]&&card[(i+4)%13]){
                cout << "straight" << endl;
                return 0;
            }
        }
        cout << "null" << endl;
    }
}

int main(){
    char comma;
    int m;
    while(cin >> m){
        for(int i=0;i<13;i++){
            card[i] = 0;
        }
        m--;
        card[m]++;
        for(int i=0;i<4;i++){
            cin >> comma >> m;
            m--;
            card[m]++;
        }
        solve();
    }
}

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

void check_multiplicity(const int* sorted_cards, std::map<int,int>& multiplicities)
{
	multiplicities.clear();

	const int* current = sorted_cards;
	const int* end = sorted_cards + 5;
	while (current != end) {
		const int* next = std::upper_bound(current, end, *current);
		++multiplicities[next - current];
		current = next;
	}
}

int count(const std::map<int,int> multiplicities, int multiplicity)
{
	std::map<int,int>::const_iterator i = multiplicities.find(multiplicity);
	return (i != multiplicities.end()) ? i->second : 0;
}

bool check_straight(const int* sorted_cards, std::map<int,int> multiplicities)
{
	if (count(multiplicities, 1) != 5) {
		return false;
	}
	return (sorted_cards[4] == sorted_cards[0] + 4)
		|| (sorted_cards[0] == 1 && sorted_cards[1] == 10);
}

int main()
{
	int cards[5] = {};
	while (scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4]) == 5) {
		std::sort(cards, cards + 5);
		std::map<int,int> multiplicities;
		check_multiplicity(cards, multiplicities);

		if (count(multiplicities, 4) > 0) {
			std::cout << "four card\n";
		} else if (count(multiplicities, 3) > 0 && count(multiplicities, 2) > 0) {
			std::cout << "full house\n";
		} else if (check_straight(cards, multiplicities)) {
			std::cout << "straight\n";
		} else if (count(multiplicities, 3) > 0) {
			std::cout << "three card\n";
		} else if (count(multiplicities, 2) == 2) {
			std::cout << "two pair\n";
		} else if (count(multiplicities, 2) == 1) {
			std::cout << "one pair\n";
		} else {
			std::cout << "null\n";
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int main(){
	int a,b,c,d,e;
	char x;
	while(cin>>a>>x>>b>>x>>c>>x>>d>>x>>e){
		string ans="null";
	int ta[14]={0};
	ta[a]++,ta[b]++,ta[c]++,ta[d]++,ta[e]++;
	int two=0,three=0,four=0;
	for(int i=1;i<=13;i++){if(ta[i]==2)two++;if(ta[i]==3)three++;if(ta[i]==4)four++;}
		if(two==1)ans="one pair";
		if(two==2)ans="two pair";
		if(three==1)ans="three card";
		for(int i=1;i<=13-4;i++)if(ta[i]==1&&ta[i+1]==1&&ta[i+2]==1&&ta[i+3]==1&&ta[i+4]==1)ans="straight";
		
		if(ta[10]==1&&ta[11]==1&&ta[12]==1&&ta[13]==1&&ta[1]==1)ans="straight";
		if(two==1&&three==1)ans="full house";
		if(four==1)ans="four card";
		cout<<ans<<endl;
	}
	return 0;
}