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<iostream>
#include<string>
#include<string.h>
using namespace std;

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}



	for(int i=0;i<13;++i){

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5)
		return 5;

	return 1;
}
int strtoint(char *s){
	int n=0;
	while(*s!='\0'){
		n += n*10 + *s - '0';
		s++;
	}
	return n;
}

void toint(char *s, int cards[5]){

	char *tp;

	tp = strtok(s,",");
	cards[0] = strtoint(tp);

	for(int i=1;i<5;++i){
		tp = strtok(NULL,",");
		cards[i] = strtoint(tp);

	}





}

int main(){

	char s[32];
	string res;
	int card[5];

	while(true){

		cin >> s;

		toint(s,card);

		switch( Result(card) ){
			case 1:res="null";break;
			case 2:res="one pair";break;
			case 3:res="two pair";break;
			case 4:res="three card";break;
			case 5:res="straight";break;
			case 6:res="full house";break;
			case 7:res="four card";break;
		}

		cout << res << endl;

	}

	return 0;
}

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

using namespace std;

int main(void)
{
	int card[5];
	int count1;
	int count2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		count1 = 0;
		count2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				count1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				count2++;
			}
		}
		
		if ((count1 == 1 && count2 == 0) || (count1 == 0 && count2 == 1)){
			printf("one pair\n");
		}
		else if (count1 == 1 && count1 == count2){
			printf("two pair\n");
		}
		else if (count1 + count2 == 3 && count1 != 0 && count2 != 0){
			printf("full house\n");
		}
			
		else if (count1 == 2 || count2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (count1 == 3 || count2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

C++: 
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int a,b,c,d,e;
  while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e)!=EOF){
    vi v(14,0);
    v[a]++;
    v[b]++;
    v[c]++;
    v[d]++;
    v[e]++;

    bool ans=false;
    if(v[1]&&v[10]&&v[11]&&v[12]&&v[13]){
      cout<<"straight"<<endl;
      ans=true;
    }
    rep(i,10)
      if(v[i]&&v[i+1]&&v[i+2]&&v[i+3]&&v[i+4]){
	cout<<"straight"<<endl;
	ans=true;
      }
    if(ans)continue;

    int na=0,nb=0,nc=0;
    rep(i,14)
      if(v[i]==2)na++;
      else if(v[i]==3)nb++;
      else if(v[i]==4)nc++;

    if(nc)cout<<"four card"<<endl;
    else if(na&&nb)cout<<"full house"<<endl;
    else if(nb)cout<<"three pair"<<endl;
    else if(na==2)cout<<"two pair"<<endl;
    else if(na)cout<<"one pair"<<endl;
    else cout<<"null"<<endl;
  END:;
  }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#define NC 5

using namespace std;

int C[ NC ];

bool isStraight(){
    for ( int i = 2; i < 5; i++ ){
	if ( C[i-1] != C[i] - 1 ) return false;
    }
    if ( C[4] == 13 ) return ( C[0] == 1 ) ? true : false;
    return ( C[0] == C[1] - 1 ) ? true : false;
}

bool isFourC(){
    for ( int i = 2; i < 4; i++ ) if ( C[i-1] != C[i] ) return false;
    return ( C[0] == C[1] || C[3] == C[4] );
}

bool isFullHouse(){
    if ( C[0] == C[1] && C[2] == C[3] && C[3] == C[4] ||
	 C[0] == C[1] && C[1] == C[2] && C[3] == C[4] ) return true;
    else return false;
}

bool isThreeC(){
    if ( C[0] == C[1] && C[1] == C[2] ||
	 C[1] == C[2] && C[2] == C[3] ||
	 C[2] == C[3] && C[3] == C[4] ) return true;
    else return false;
}

bool isPair(int pair){
    int sum = 0;
    for ( int i = 1; i < 5; i++ ) if ( C[i-1] == C[i] ) sum++;
    return sum == pair; // one pair ツつゥ two pair 
}

string judge(){
    sort( C, C + NC );

    if ( isStraight() ) return "straight";
    else if ( isFourC() ) return "four card";
    else if ( isFullHouse() ) return "full house";
    else if ( isThreeC() ) return "three card";
    else if ( isPair(2) ) return "two pair";
    else if ( isPair(1) ) return "one pair";
    else return "null";
}

bool read(){
    char comma;
    if ( !(cin >> C[0]) ) return false;
    for ( int i = 1; i < NC; i++ ){
	cin >> comma >> C[i];
    }
    return true;
}

int main(){
    while ( read() ){
	cout << judge() << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int card[5]; char ch;
	while(cin>>card[0]>>ch>>card[1]>>ch>>card[2]>>ch>>card[3]>>ch>>card[4]){
	int num[13]={0};
	for(int i=0;i<5;i++) num[card[i]-1]++;
	string ans="null";
	int pair=0;
	for(int i=0;i<13;i++){
		if(num[i]==2 && pair==0 && ans!="three card") ans="one pair",pair++;
		else if(num[i]==2 && pair==1 && ans!="three card") ans="two pair",pair++;
		else if(num[i]==3) ans="three card";
		else if(num[i]==4) ans="four cards";
	};
	if(ans=="three card" && pair==1) ans="full house";
	if(ans=="null") do{
		int flag=0;
		for(int i=0;i<=9;i++){
			if(flag==0 && num[i]==1) flag=1;
			if(flag==1 && num[i+1]==1&& num[i+2] && num[i+3] && num[i+4]==1) ans="straight";
		};
	}while(0);
	cout << ans << '\n' ;
	};
}