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 <stdio.h>

int bigger(int a, int b){
	if(a>=b){return a;}
	return b;
}

int one_pair(int a[]){
	int i, j;
	for(i=0; i<5; i++){
		for(j=0; j<5; j++){
			if(j!=i){
				if(a[i]==a[j]){
					return 1;
				}
			}
		}
	}
	return 0;
}

int two_pair(int a[]){
	int i, j, count=0;
	for(i=0; i<5; i++){
		for(j=0; j<5; j++){
			if(i!=j){
				if(a[i] == a[j]){
					count++;
				}
			}
		}
	}
	if(count == 4){
		return 1;
	}
	return 0;
}

int three_card(int a[]){
	int i, j, k;
	for(i=0; i<5; i++){
		for(j=0; j<5; j++){
			for(k=0; k<5; k++){
				if(i!=j && i!=k && j!=k){
					if(a[i]==a[j] && a[i]==a[k]){
						return 1;
					}
				}
			}
		}
	}
	return 0;
}

int four_card(int a[]){
	int i, j, count;
	for(i=0; i<13; i++){
		count=0;
		for(j=0; j<5; j++){
			if(a[j]==i+1){count++;}
		}
		if(count==4){return 1;}
	}
	return 0;
}

int straight(int a[]){
	int i, j, m, flag=0, count;
	
	for(i=0; i<5; i++){
		for(j=0; j<5; j++){
			if(a[i]<a[j]){
				m=a[i];
				a[i]=a[j];
				a[j]=m;
			}
		}
	}
	count=0;
	for(i=a[0], j=0; i<5+a[0], j<5; i++, j++){
		if(i==a[j]){
			count++;
		}
	}
	if(count==5){flag++;}
	
	if(a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13){
		flag++;
	}
	
	if(a[0]==1 && a[1]==2){
		flag*=0;
	}
	
	if(flag){
		return 1;
	}
	return 0;
}

int full_house(int a[]){
	int i, j, k, m, count;
	for(i=0; i<13; i++){
		count=0;
		for(j=0; j<5; j++){
			if(a[j]==i+1){
				count++;
				a[j]=-1;
			}
		}
		if(count==3){
			break;
		}
	}
	if(count!=3){return 0;}
	
	for(i=0; i<13; i++){
		count=0;
		for(j=0; j<5; j++){
			if(a[j]=i+1){
				count++;
				a[j]=-1;
				return 1;
			}
		}
	}
	return 0;
}

int output(int n){
	switch(n){
		case 1:
			printf("null\n");
			break;
		case 2:
			printf("one pair\n");
			break;
		case 3:
			printf("two pair\n");
			break;
		case 4:
			printf("three card\n");
			break;
		case 5:
			printf("straight\n");
			break;
		case 6:
			printf("full house\n");
			break;
		case 7:
			printf("four card\n");
			break;
		default:
			return 0;
	}
	return 1;
}

int main (void){
	int cards[5], result;
	while(scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4])!=EOF){
		result=1;
		if(one_pair(cards)){
			result=bigger(result, 2);
		}
		if(two_pair(cards)){
			result=bigger(result, 3);
		}
		if(three_card(cards)){
			result=bigger(result, 4);
		}
		if(straight(cards)){
			result=bigger(result, 5);
		}
		if(full_house(cards)){
			result=bigger(result, 6);
		}
		if(four_card(cards)){
			result=bigger(result, 7);
		}
		output(result);
	}
	
	return 0;
}

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

int main()
{
	int x;
	
	while(scanf("%d",&x)!=EOF)
	{
		int a[14]={};
		a[x]++;
		for(int i=0;i<4;i++)
		{
			scanf(",%d",&x);
			a[x]++;
		}
		int c=0,z=0;
		for(int i=1;i<=13;i++)c=max(c,a[i]);
		for(int i=1;i<=13;i++)if(c==a[i])z++;
		if(c==2&&z==1)
		{
			cout<<"one pair"<<endl;
		}
		else if(c==2&&z==2)
		{
			cout<<"two pair"<<endl;
		}
		else if(c==3)
		{
			for(int i=1;i<=13;i++)
			{
				if(a[i]==2)
				{
					cout<<"full house"<<endl;
					break;
				}
				if(i==13)
				{
					cout<<"three card"<<endl;
				}
			}
		}
		else if(c==4)
		{
			cout<<"four card"<<endl;
		}
		else
		{
			bool e=false;
			for(int i=1;i<=10;i++)
			{
				bool hoge=true;
				for(int l=0;l<5;l++)
				{
					int g=i+l;
					if(g>13)
					{
						g-=13;
					}
					cout<<a[g]<<" ";
					if(a[g]==0)hoge=false;
				}
				cout<<endl;
				if(hoge==true)e=true;
			}
			if(e)cout<<"straight"<<endl;
			else cout<<"null"<<endl;
			
		}
	}
}

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

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

int main() {
	int a[5];
	while(scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]) != EOF) {
		bool three = false, four = false, straight = false, full = false;
		int pair = 0, count = 1;
		sort(a, a + 5);
		rep(i, 4) {
			if(a[i] == a[i+1]) ++count;
			else count = 1;
			if(count == 4) four = true;
			if(count == 3) three = true;
			else if(count == 2) ++pair;
		}
		rep(i, 4) {
			if(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13) {
				straight = true;
				break;
			}
			if(a[i] != a[i + 1] - 1) {
				straight = false;
				break;
			}
			else straight = true;
		}
		if(three && pair == 2) full = true;
		if(four) cout << "four card" << endl;
		else if(full) cout << "full house" << endl;
		else if(straight) cout << "straight" << endl;
		else if(three) cout << "three card" << endl;
		else if(pair == 2) cout << "two pair" << endl;
		else if(pair == 1) cout << "one pair" << endl;
		else cout << "null" << endl;
	}
	return 0;
}

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

int main(){
    int a[5];
    char c;
    while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
        sort(a,a+5);
        int c[5],j=0;
        memset(c,0,sizeof(c));
        for(int i=0;i<4;i++){
            if(a[i+1]!=a[i])
                j++;
            if(a[i+1]==a[i]){
                c[j]++;
            }
        }
        int p=0,t=0,f=0;
        for(int i=0;i<5;i++){
            if(c[i]==1)p++;
            if(c[i]==2)t++;
            if(c[i]==3)f++;
        }
        if(p==2){
            cout<<"two pair"<<endl;
        }
        else if(p==1&&t==1)
            cout<<"full house"<<endl;
        else if(t==1)
            cout<<"three card"<<endl;
        else if(f==1)
            cout<<"four card"<<endl;
        else if(p==1){
            cout<<"one pair"<<endl;
        }
        else if((a[3]==a[4]-1)&&(a[1]==a[2]-1)&&(a[2]==a[3]-1)&&((a[0]==a[1]-1)||(a[4]==13&&a[0]==1)))
            cout<<"straight"<<endl;
        else cout<<"null"<<endl;
    }
}