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

using namespace std;

int main() {

	int ans, h[5];

	while(1) {
		ans=0;
		for(int i=0; i<5; i++) {
			cin >> h[i];
		}
		if(cin.eof())
			break;
		sort(h, h+5);
		for(int i=0; i<4; i++) {
			for(int j=i+1; j<5; j++) {
				if(h[i]==h[j])
					ans++;
			}
		}
		if(h[4]==h[3]+1&&h[3]==h[2]+1&&h[2]==h[1]+1&&h[1]==h[0]+1) {
			ans=5;
		}
		if(h[0]==1&&h[4]==13&&h[3]==12&&h[2]==11&&h[1]==10) {
			ans=5;
		}
		switch(ans) {
			case 0:
				cout << "null" << endl;
				break;
			case 1:
				cout << "one pair" << endl;
				break;
			case 2:
				cout << "two pair" << endl;
				break;
			case 3:
				cout << "three cards" << endl;
				break;
			case 5:
				cout << "straight" << endl;
				break;
			case 4:
				cout << "full house" << endl;
				break;
			case 6:
				cout << "four cards" << endl;
				break;
			case 10:
				cout << "four cards" << endl;
				break;
		}
	}

	return 0;

}

C++: 
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#endif

#define ITER(c)         __typeof__((c).begin())
#define FOREACH(it, c)  for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)        __typeof__((c).rbegin())
#define RFOREACH(it, c) for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)       REPEAT(i, 0, n)
#define REPEAT(i, k, n) for (int i = (k); i < (n); ++i)
#define REVREP(i, n)    for (int i = ((n)-1); i >= 0; --i)
#define FIND(c, n)      std::find((c).begin(), (c).end(), (n));
#define BSEARCH(c, n)   std::binary_search((c).begin(), (c).end(), (n))
#define LLPOW(p1,p2)    ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)      (sizeof(A)/sizeof((A)[0]))
#define MIN(p1,p2)      (((p1)<(p2))?(p1):(p2))
#define MAX(p1,p2)      (((p1)>(p2))?(p1):(p2))
#define CIN_NO_SYNC     do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)       fgets((p), sizeof(p), stdin)
#define CHOMP(p)        do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n') *_q = 0; } while(0)

typedef long long ll;
typedef unsigned long long ull;

#ifdef _DEBUG
#define pf printf
#define pr(n) do { cout << #n " = " << (n) << endl; } while(0)
#else
#define pf(...) /* */
#define pr(...) /* */
#endif

const char *str[] = {
    "null",
    "one pair",
    "two pair",
    "three card",
    "straight",
    "full house",
    "four card",
};

bool is_fcd(int n[5],int m[12]){ return (m[0] == 4); }
bool is_flh(int n[5],int m[12]){ return (m[0] == 3 && m[1] == 2); }
bool is_str(int n[5],int m[12]){
    if(n[0] == n[1]-1 && n[1] == n[2]-1 && n[2] == n[3]-1 && n[3] == n[4]-1) return true;
    if(n[0] == 1 && n[1] == 10 && n[2] == 11 && n[3] == 12 && n[4] == 13) return true;
    return false;
}
bool is_thr(int n[5],int m[12]){ return (m[0] == 3); }
bool is_two(int n[5],int m[12]){ return (m[0] == 2 && m[1] == 2); }
bool is_one(int n[5],int m[12]){ return (m[0] == 2); }

int poker(int n[5]){
    int m[13];
    memset(m, 0, sizeof(m));
    REP(i,5) m[n[i]-1]++;
    sort(n, n+5, less<int>());
    sort(m, m+13, greater<int>());

    if(is_fcd(n,m)) return 6;
    if(is_flh(n,m)) return 5;
    if(is_str(n,m)) return 4;
    if(is_thr(n,m)) return 3;
    if(is_two(n,m)) return 2;
    if(is_one(n,m)) return 1;
    return 0;
}

int main(){
    string s;
    while(getline(cin, s)){
        int n[5];
        sscanf(s.c_str(), "%d,%d,%d,%d,%d", &n[0], &n[1], &n[2], &n[3], &n[4]);
        cout << str[poker(n)] << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

const int MAX_N = 13;
const int n = MAX_N;
const int m = 5;
int card[MAX_N];
vi x(m);

string judge(vi num)
{
  if(num[0] == 4) return "four card";
  if(num[0] == 3 && num[1] == 2) return "full house" ;
  if(num[0] == 1 && x[4] - x[0] == 4) return "straight";
  if(num[0] == 1 && x[0] == 0 && x[1] == 9 && x[4] == 12) return "straight";
  if(num[0] == 3) return "three card";
  if(num[0] == 2 && num[1] == 2) return "two pair";
  if(num[0] == 2) return "one pair";
  return "null";
}

int main()
{
  rep(i, n) card[i] = i;

  while(~scanf("%d,%d,%d,%d,%d", &x[0], &x[1], &x[2], &x[3], &x[4], &x[5])){
    vi num(MAX_N);
    rep(i, m) x[i] -= 1;
    rep(i, m) num[x[i]] += 1;
    sort(ALL(num), greater<int>());
    sort(ALL(x));
    cout << judge(num) << endl;
  }

  return 0;
}