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 <vector>
#include <map>
#include <stack>
#include <list>
#include <queue>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <math.h>

#define PREP(i, m, n) for(int i = m; i < n; i++)
#define MREP(i, m, n) for(int i = m - 1; i >= n; i--)

#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define prime first
#define weight second
#define MP make_pair
#define PB push_back

using namespace std;

string rule(int two, int three, int four, int st, map<int, int> table){
	
	if(four == 1) return "four card";
	else if(three == 1){
		if(two == 1) return "full house";
		else return "three card";
	}
	else if(two == 2) return "two pair";
	else if(two == 1) return "one pair";

	for(int i = 0; i < table.size(); i++){
		if(table[i] == st) return "straight";
	}

	return "null";
}

int main(){
	map<int, int> table;
	table[0] = 15;
	table[1] = 20;
	table[2] = 25;
	table[3] = 30;
	table[4] = 35;
	table[5] = 40;
	table[6] = 45;
	table[7] = 50;
	table[8] = 55;
	table[9] = 47;
	
	int tmp = 0;
	while(scanf("%d", &tmp) != EOF){
		vector<int> input;
		input.push_back(tmp);
		for(int i = 0; i < 4; i++){
			scanf(",%d", &tmp);
			input.push_back(tmp);
		}
		
		map<int, int> hand;
		int two = 0, three = 0, four = 0,st = 0;
		
		for(int i = 0; i < 5; i++){
			if(hand.find(input[i]) != hand.end()) hand[input[i]]++;
			else hand[input[i]] = 1;
		}

		for(map<int, int>::iterator it = hand.begin(); it != hand.end(); it++){
			if(it->second == 2) two++;
			else if(it->second == 3) three++;
			else if(it->second == 4) four++;
			st += it->first;
		}

		cout << rule(two, three, four, st, table) << endl;
	}
	return 0;
}

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

int a[5];

string poker(int p, int q, int r, int s, int t)
{
	if (p == q && q == r && r == s)
	{
		return "four card";
	}
	if (s == t && q == r && r == s)
	{
		return "four card";
	}
	if (p == q && q == r && s == t)
	{
		return "full house";
	}
	if (p == q && r == s && s == t)
	{
		return "full house";
	}
	if (p == q - 1 && q == r - 1 && r == s - 1 && s == t - 1)
	{
		return "straight";
	}
	if (p == 1 && q == 10 && r == 11 && s == 12 && t == 13)
	{
		return "straight";
	}
	if (p == q && q == r)
	{
		return "three card";
	}
	if (r == s && q == r)
	{
		return "three card";
	}
	if (r == s && s == t)
	{
		return "three card";
	}
	if (p == q && r == s)
	{
		return "two pair";
	}
	if (p == q && s == t)
	{
		return "two pair";
	}
	if (q == r && s == t)
	{
		return "two pair";
	}
	if (p == q)
	{
		return "one pair";
	}
	if (q == r)
	{
		return "one pair";
	}
	if (r == s)
	{
		return "one pair";
	}
	if (s == t)
	{
		return "one pair";
	}
	return "null";
}

int main() {
	while (scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]))
	{
		sort(a, a + 5);
		cout << poker(a[0], a[1], a[2], a[3], a[4]) << endl;
	}
}

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

#define ONE 1
#define TWO 2
#define THREE 3
#define STO 4
#define FULL 5
#define FOUR 6

int main(void){
	int a[5];
	int hand;
	int cnt[3];
	int num;
	int temp;
	int i;

	while(scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]) != EOF){
		hand = 0;
		num = 0;
		cnt[0] = 1;
		cnt[1] = 1;
		cnt[2] = 1;
		sort(a, a+5);
		temp = a[0];
		for(i=1; i<5; i++){
			if(temp == a[i]){
			   	cnt[num]++;
			}else{
				temp = a[i];
				if(cnt[num] == 1){
					cnt[num] = 1;
				}else{
					num++;
				}
			}
		}
		if(cnt[0] == 4 || cnt[1] == 4 || cnt[2] == 4){
			hand = FOUR;
			puts("four card");
		}else if(cnt[0] + cnt[1] + cnt[2] == 6){
			hand = FULL;
			puts("full house");
		}else if((a[0]+1 == a[1] && a[1]+1 == a[2] && a[2]+1 == a[3] && a[3]+1 == a[4]) ||
			   	(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13)){
			hand = STO;
			puts("straight");
		}
		else if(cnt[0] == 3 || cnt[1] == 3 || cnt[2] == 3){
			hand = THREE;	//two pair
			puts("three card");
		}else if(cnt[0] + cnt[1] + cnt[2] == 5){
			hand = TWO;	//three pair
			puts("two pair");
		}else if(cnt[0] == 2 || cnt[1] == 2 || cnt[2] == 2){
			hand = ONE;
			puts("one pair");
		}else{
			puts("null");
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
 
int main()
{
    int card[5];
     
    while (scanf("%d", &card[0]) != EOF) {
        for (int i = 1; i < 5; i++) {
            scanf(",%d", &card[i]);
        }
         
        int cnt = 0;
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                if (card[i] == card[j] && i != j) {
                    cnt++;
                }
            }
        }
         
        int flg = 0;
        switch (cnt) {
            case 2:
                printf("one pair\n");
                flg = 2;
                break;
            case 4:
                printf("two pair\n");
                flg = 2;
                break;
            case 6:
                printf("three card\n");
                flg = 2;
                break;
            case 8:
                printf("full house\n");
                flg = 2;
                break;
            case 12:
                printf("four card\n");
                flg = 2;
                break;
            default:
                flg = 1;
        }
         
        if (flg == 2) continue;
         
        int ct = 0;
        if (flg) {
            sort(card, card + 5);
            for (int i = 1; i < 5; i++) {
                if(card[i] - card[i-1] == 1) ct++;
            }
        }
         
        if (ct == 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 {
            printf("null\n");
        }
    } 
    return 0;
}