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

int main(){
    int a[5];
    while(scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])!=EOF){
        vector<int> hand(15, 0);
        for(int i=0; i<5; i++){
            hand[a[i]]++;
        }
        hand[14] = hand[1];
        int fs=0, sc=0;
        for(int i=1; i<=13; i++){
            if(hand[i] >= fs){
                sc = fs;
                fs = hand[i];
            }else if(hand[i] > sc){
                sc = hand[i];
            }
        }
        bool straight = false;
        for(int i=1; i<=10; i++){
            bool continued = true;
            for(int j=0; j<5; j++){
                if(hand[i+j]==0){
                    continued = false;
                    break;
                }
            }
            if(continued){
                straight = true;
                break;
            }
        }
        if(fs == 4){
            cout << "four card" << endl;
        }else if(fs==3 && sc==2){
            cout << "full house" << endl;
        }else if(straight){
            cout << "straight" << endl;
        }else if(fs==3){
            cout << "three card" << endl;
        }else if(fs==2 && sc==2){
            cout << "two pair" << endl;
        }else if(fs == 2){
            cout << "one pair" << endl;
        }else{
            cout << "null" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;



string judge(int* nums){
	set<int> st;
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		st.insert(nums[i]);
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	foreach(it,count){

	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}



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

C++: #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

using namespace std;
int main(void)
{
  for(;;){
    int n[5];
    char c;
    REP(i,5){
      if(i) cin >> c;
      n[i]=0;
      cin >> n[i];
      if(n[i] == 0) return 0;
    }
    int num[16];
    REP(i,16) num[i]=0;
    REP(i,5) ++num[n[i]];
    num[14]=num[1];
    string s="null";
    REP(i,11){
      int st=0;
      REP(j,5) if(num[i+j]) ++st;
      if(st==5) s="straight";
    }
    int pa=0;
    REP(i,5) REP(j,i) if(n[i]==n[j]) ++pa;
    if(pa==1) s="one pair";
    if(pa==2) s="two pair";
    if(pa==3) s="three card";
    if(pa==4) s="full house";
    if(pa==6) s="four card";
    cout << s << endl;



  }
}

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]++;
	for (i = 0; i < 13; 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]++;
	for (i = 0; i < 13; 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]++;
	for (i = 0; i < 13; i++)
	{
		if (c[i] == 4)
			return true;
	}
	return false;
}

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

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

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

	sort(c, c+13, greater<int>());
	
	for (i = 0; i < 5; i++)
	{
		if (c[i] == 1)
			b = true;
		else
			b = 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]++;
	if (nPair(card) == 1 && isThreeCard(card))
		return true;
	else
		return false;
}

C++: #include <stdio.h>

int main(void){
	int card[14] , buf[5] = {0} , i , flag , check_3 , cnt;
	while(scanf("%d,%d,%d,%d,%d" , &buf[0] , &buf[1] , &buf[2] , &buf[3] , &buf[4])!=EOF){
		for(i=1;i<14;i++){
			card[i] = 0;
		}
		for(i=0;i<5;i++){
			card[buf[i]]++;
		}
		flag = 0;
		check_3 = 0;
		cnt = 0;

		for(i=1;i<=13;i++){
			if(card[i] == 4){
				printf("four card\n");
				flag = 1;
			}
			if(card[i] == 3){
				check_3 = 1;
			}
		}
		if(flag) continue;

		if(check_3){
			for(i=1;i<=13;i++){
				if(card[i] == 2){
					printf("full house\n");
					flag = 1;
				}
			}
		}
		if(flag) continue;

		for(i=1;i<=9;i++){
			if(card[i]==1&&card[i+1]==1&&card[i+2]==1&&card[i+3]==1&&card[i+4]==1){
				printf("straight\n");
				flag = 1;
			}
		}
		if(flag) continue;
		if(card[10]==1&&card[11]==1&&card[12]==1&&card[13]==1&&card[1]==1){
			printf("straight\n");
			continue;
		}

		if(check_3){
			printf("three card\n");
			continue;
		}

		for(i=1;i<=13;i++){
			if(card[i] == 2) cnt++;
		}
		if(cnt == 2){
			printf("two pair\n");
			continue;
		}

		if(cnt == 1){
			printf("one pair\n");
			continue;
		}

		printf("null\n");
	}
	return 0;
}