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 <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
vector<string> split( string s, string c )
{
	vector<string> ret;
	for( int i=0, n; i <= s.length(); i=n+1 ){

		n = s.find_first_of( c, i );
		if( n == string::npos ) n = s.length();
		string tmp = s.substr( i, n-i );
		ret.push_back(tmp);
	}
	return ret;
}
string num[13] = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
int main(void){
  string tmp;
  while(cin>>tmp){
    vector<string> cardstr = split(tmp,",");
    vector<int> card;
    REP(i,cardstr.size()){
      REP(j,13){
        if(cardstr[i]==num[j]){
          card.push_back(j+1);
        }
      }
    } 
    sort(card.begin(),card.end());
    int c[3]={0};
    bool st1 = false;
    bool st2 = true;
    //ツカツウツδ督ト
    for(int i=1; i<=13; i++){
      if(count(card.begin(),card.end(),i)>=2){
        c[count(card.begin(),card.end(),i)-2]++;
      }
    }
    //ツスツトツδ個ーツト
    if(card[0]==1&&card[1]==10&&card[2]==11&&card[3]==12&&card[4]==13)
      st1 = true;
    for(int i=1; i<5; i++){
      if(card[i]-card[i-1]!=1){
        st2 = false;
        break;
      }
    }
    if(c[2]){
      cout<<"four card"<<endl;
    }else if(c[1]&&c[0]){
      cout<<"full house"<<endl;
    }else if(st1||st2){
      cout<<"straight"<<endl;
    }else if(c[1]){
      cout<<"three card"<<endl;
    }else if(c[0]==2){
      cout<<"two pair"<<endl;
    }else if(c[0]==1){
      cout<<"one pair"<<endl;
    }else{
      cout<<"null"<<endl;
    }
  }
  return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int a[5];
	while(~scanf("%d,%d,%d,%d,%d",a,a+1,a+2,a+3,a+4)){
		sort(a,a+5);
		if(a[0]==a[3]||a[1]==a[4]){
			cout<<"four card"<<endl;
		}else if(a[0]==a[2]&&a[3]==a[4]||a[0]==a[1]&&a[2]==a[4]){
			cout<<"full house"<<endl;
		}else if((a[0]+1==a[1]||a[0]==1&&a[4]==13)&&a[1]+1==a[2]&&a[2]+1==a[3]&&a[3]+1==a[4]){
			cout<<"straight"<<endl;
		}else if(a[0]==a[2]||a[1]==a[3]||a[2]==a[4]){
			cout<<"three card"<<endl;
		}else if(a[0]==a[1]&&(a[2]==a[3]||a[3]==a[4])||a[1]==a[2]&&a[3]==a[4]){
			cout<<"two pair"<<endl;
		}else if(a[0]==a[1]||a[1]==a[2]||a[2]==a[3]||a[3]==a[4]){
			cout<<"one pair"<<endl;
		}else{
			cout<<"null"<<endl;
		}
	}
	return 0;
}

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

bool straight(int* a){
	for(int i = 0; i < 4; i++){
		if(a[i + 1] - a[i] != 1) break;
		if(i + 1 == 4) return true;
	}
	
	return (a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13);
}

int main(){
	int card[5];
	
	while((scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4])) != EOF){
		sort(card, card + 5);
		
		//four card
		if(card[2] == card[1] && card[2] == card[3] && (card[2] == card[0] || card[2] == card[4])){
			printf("four card\n");
		}
		//full house
		else if(card[0] == card[1] && card[3] == card[4] && (card[2] == card[1] || card[2] == card[3])){
			printf("full house\n");
		}
		//straight
		else if(straight(card)){
			printf("straight\n");
		}
		//three card
		else if((card[0] == card[1] && card[1] == card[2]) || (card[1] == card[2] && card[2] == card[3]) || (card[2] == card[3] && card[3] == card[4])){
			printf("three card\n");
		}
		//two pair
		else if((card[0] == card[1] && (card[2] == card[3] || card[3] == card[4])) || (card[1] == card[2] && card[3] == card[4])){
			printf("two pair\n");
		}
		//one pair
		else if(card[0] == card[1] || card[1] == card[2] || card[2] == card[3] || card[3] == card[4]){
			printf("one pair\n");
		}
		//null
		else{
			printf("null\n");
		}
	}
	
	return 0;
}

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

using namespace std;
int main(void)
{
	int card[5];
	char kari;
	while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				else if(check[i] == 3) three++;
				else if(check[i] >= 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(three == 1) printf("full house\n");
			else if(pair == 2) printf("two pair\n");
			else printf("one pair\n");
		}
		else if(three >= 1)
		{
			if(pair == 1) printf("full house\n");
			else if(three == 2) printf("full house\n");
			else printf("three card\n");
		}
		else if(four >= 1) printf("four card\n");
		else if(st != 1) printf("null\n");
	}
	kitune:
	return 0;
}