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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i,j,k,n;
  int res[7],tmp,maxi,f;
  vector<int> in(5);
  set<int> s;
  string data[7] = {"four card","full house","straight","three card","two pair","one pair","null"};

  while(scanf("%d,%d,%d,%d,%d",&in[0],&in[1],&in[2],&in[3],&in[4],&in[5]) != EOF){
    rep(i,7) res[i] = 0;
    s.clear();
    rep(i,5) s.insert(in[i]);
    f = 1;
    sort(in.begin(),in.end());

    maxi = 0;
    rep(i,5){
      tmp = 0;
      rep(j,5) if(in[i] == in[j]) tmp++;
      if(maxi < tmp) maxi = tmp;
    }

    if((int)s.size() == 2){
      if(maxi == 4) res[0] = 1;
      if(maxi == 3) res[1] = 1;
    }
    if((int)s.size() == 3){
      if(maxi == 3) res[3] = 1;
      if(maxi == 2) res[4] = 1;
    }
    if((int)s.size() == 4) res[5] = 1;

    REP(i,1,5) if(in[i-1] + 1 != in[i]) f = 0;
    if(f && (int)s.size() == 5) res[2] = 1;
    f = 1;
    if(in[0] = 1 && in[1] == 10 && in[2] == 11 && in[3] == 12 && in[4] == 13) res[2] = 1;

    res[6] = 1;

    rep(i,7) if(res[i]){
      cout << data[i] << endl;
      break;
    }
  }


  return 0;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	int a[5];
	int kari;
	char d;
	
	while (cin >> a[0] >> d >> a[1] >> d >> a[2] >> d >> a[3] >> d >> a[4]) {
		for (int i = 4; i > 0; i--) {
			for (int j = 0; j < i; j++) {
				if (a[j] > a[j+1]) {
					kari = a[j];
					a[j] = a[j+1];
					a[j+1] = kari;
				}
			}
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3] || a[3] == a[4]) {
			if ((a[0] == a[1] && a[1] == a[2]) || (a[1] == a[2] && a[2] == a[3]) || (a[2] == a[3] && a[3] == a[4])) {
				if (((a[0] == a[1] && a[1] == a[2]) && (a[3] == a[4])) || ((a[0] == a[1]) && (a[2] == a[3] && a[3] == a[4]))) {
					cout << "full house" << endl;
				} else if ((a[0] == a[1] && a[1] == a[2] && a[2] == a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])){
					cout << "four card" << endl;
				}else {
					cout << "three card" << endl;
				}
			} else if ((a[0] == a[1] && a[2] == a[3]) || (a[0] == a[1] && a[3] == a[4]) || (a[1] == a[2] && a[3] == a[4])) {
				if ((a[0] == a[1] && a[1] == a[2] && a[2] == a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])) {
					cout << "four card" << endl;
				} else {
					cout << "two pair" << endl;
				}
			} else {
				cout << "one pair" << endl;
			}
		} else if ((a[1] == a[0] + 1 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1) || (a[0]  == 1 && a[1] == 10 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1)){
			cout << "straight" << endl;
		} else {
			cout << "null" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int t[5];
  char c;
  while(cin>>t[0]>>c>>t[1]>>c>>t[2]>>c>>t[3]>>c>>t[4]){
    int same[14]={0};
    int a = 0;
    int b = 0;
    bool role = false;
    for(int i=0;i<5;i++) same[t[i]]++;
    for(int i=0;i<14;i++){
      if(same[i]>1&&a==0) a = same[i];
      else if(same[i]>1&&b==0) b = same[i];
    }
    for(int i=1;i<11;i++){
      int h = i+4;
      if(h==14) h = 1; 
      if(same[i]==1&&same[i+1]==1&&same[i+2]==1&&same[i+3]==1&&same[h]==1){ cout << "straight" << endl;
	role = true;}
    }
    if(!role){
      if(a==4) cout << "four card" << endl;
      else if(a==3&&b==2||a==2&&b==3) cout << "full house" << endl;
      else if(a==3) cout << "three card" << endl;
      else if(a==2&&b==2) cout << "two pair" << endl;
      else if(a==2) cout << "one pair" << endl;
      else cout << "null" << endl;
    }
  }
  return 0;
}

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

const string ans[7]={"null","one pair","two pair","three card","straight","full house","four card"};

int main(void){
	int a[5];
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
		int cnt[13]={},ans_num=0,tmp=0;
		for(int i=0;i<5;++i) ++cnt[a[i]-1];
		for(int i=0,count=0;i<13+1;++i){
			if(cnt[(i+13)%13]>1)break;
			if(cnt[(i+13)%13]==1)++count;
			if(cnt[(i+13)%13]==0)count=0;
			if(count==5) ans_num=4;
		}
		if(!ans_num){
			for(int i=0;i<13;++i){
				if(cnt[i]==4){ans_num=6;break;}
				if(cnt[i]==3)tmp+=3;
				if(cnt[i]==2)tmp+=2;
			}
			if(tmp==5)ans_num=5;
			if(tmp==4)ans_num=2;
			if(tmp==3)ans_num=3;
			if(tmp==2)ans_num=1;
		}
		cout<<ans[ans_num]<<endl;
	}
	return 0;
}