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++: int main(){
    int tmp[5];
    char com;
    while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
    int hand[15]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }
   
    int pair=0,three=0,str=0,four=0;
    for(int i=1; i<15; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str == 5)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;
  }
    
}

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

using namespace std;

void solve()
{
	int a[5];
	char temp;
	while(~scanf("%d,%d,%d,%d,%d%c", &a[0], &a[1], &a[2], &a[3], &a[4], &temp))
	{
		map<int, int> Map;
		for(int i = 0; i < 5; ++i)
		{
			Map[a[i]]++;
		}
		if(Map.size() == 2)
		{
			map<int, int>::iterator Ite = Map.begin();
			if(Ite->second == 1 || Ite->second == 4)
			{
				cout << "four card" << endl;
			}
			else if(Ite->second == 2 || Ite->second == 3)
			{
				cout << "full house" << endl;
			}
		}
		else if(Map.size() == 3)
		{
			for(map<int, int>::iterator Ite = Map.begin(); Ite != Map.end(); ++Ite)
			{
				if(Ite->second == 2)
				{
					cout << "two pair" << endl;
					break;
				}
				else if(Ite->second == 3)
				{
					cout << "three card" << endl;
					break;
				}
			}
		}
		else if(Map.size() == 4)
		{
			cout << "one pair" << endl;
		}
		else
		{
			map<int, int>::iterator Ite = Map.begin();
			map<int, int>::iterator IteNext = Map.begin();
			++IteNext;
			map<int, int>::iterator IteEnd = Map.end();
			IteEnd--;
			if(IteEnd->first - Ite->first == 4 || IteNext->first - Ite->first == 9)
			{
				cout << "straight" << endl;
			}
			else
			{
				cout << "null" << endl;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

#define loop(i,a,b) for(int i=a; i<b; i++)
#define rep(i,a) loop(i,0,a)
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){
        sort(a,a+5);
        int n=0;
        rep(i,4)loop(j,i+1,5){
            if(a[i]==a[j])n++;
        }
        bool st=true;
        rep(i,4)if(a[i]+1!=a[i+1])st=false;
        if(a[0]==1&&
           a[1]==10&&
           a[2]==11&&
           a[3]==12&&
           a[4]==13) st=true;

        string ans;
        if(n==6)
            ans="four card";
        else if(n==4)
            ans="full house";
        else if(st)
            ans="straight";
        else if(n==3)
            ans="three card";
        else if(n==2)
            ans="two pair";
        else if(n==1)
            ans="one pair";
        else
            ans="null";
        cout<<ans<<endl;
    }
}

C++: #include <cstdio>
#include <vector>
using namespace std;
/* null
 * one pair
 * two pair
 * three card
 * straight
 * full house
 * four card
 * */
int main() {
	vector<int> cards(5);
	while (scanf("%d%*c%d%*c%d%*c%d%*c%d",&cards[0],&cards[1],&cards[2],
				&cards[3],&cards[4])) {
		vector<int> cnt(13, 0);
		for (int i=0; i<5; i++) cnt[cards[i]-1]++;
		int two = 0, three = 0, four = 0;
		for (int i=0; i<13; i++) {
			if (cnt[i] == 2) two++;
			if (cnt[i] == 3) three++;
			if (cnt[i] == 4) four++;
		}
		if (four == 1) {
			printf("four card\n");
			continue;
		} else if (two == 1 && three == 1) {
			printf("full house\n");
			continue;
		} else if (three == 1) {
			printf("three card\n");
			continue;
		} else if (two == 2) {
			printf("two pair\n");
			continue;
		} else if (two == 1) {
			printf("one pair\n");
			continue;
		}
		int c = 0;
		bool flag = false;
		for (int i=0; i<9; i++) {
			if (cnt[i] == 1) {
				if (cnt[i+1]==1&&cnt[i+2]==1&&cnt[i+3]==1&&
						cnt[i+4]==1) {
					flag = true;
					break;
				}
			}
		}
		if (flag||
				(cnt[9]==1&&cnt[10]==1&&cnt[11]==1&&cnt[12]==1&&cnt[0]==1)) {
			printf("straight\n");
		} else {
			printf("null\n");
		}
	}	
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

namespace std {
    bool operator<(const P a, const P b) {
        return a.X != b.X ? a.X < b.X : a.Y < b.Y;
    }
}

int const MOD = 1000000007;

int main() {
    int a[5];
    int r[13];
    while(cin >> a[0]) {
        memset(r, 0, sizeof(r));
        r[a[0] - 1]++;
        rep(i,1,5) {
            scanf(",%d", &a[i]);
            r[a[i] - 1]++;
        }

        int x = 0, y = 0, z = 0;
        rep(i,0,13) {
            if(r[i] == 2) x++;
            if(r[i] == 3) y++;
            if(r[i] == 4) z++;
        }

        bool isnull = true;
        if(z == 1) {cout << "four card" << endl; continue;}
        else if(x == 1 && y == 1) {cout << "full house" << endl; continue;}
        else {
            rep(i,0,10) {
                if(r[i] == 1 && r[i+1] == 1 && r[i+2] == 1 && r[i+3] == 1 && r[(i+4) % 13] == 1) {
                    cout << "straight" << endl;
                    isnull = false;
                }
            }
        }

        if(y == 1) {cout << "three card" << endl; continue;}
        else if(x == 2) {cout << "two pair" << endl; continue;}
        else if(x == 1) {cout << "one pair" << endl; continue;}
        else if(isnull) cout << "null" << endl;
    }
    return 0;
}