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 <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  string str;
  while(cin>>str){
    vector<int> card;
    vector<int> cnt(13,0);
    for(int i = 0 ; i < str.size() ; i ++){
      if('1' <= str[i] && str[1] <= '9'){
	if('0' <= str[i + 1] && str[i + 1] <= '9'){
	  int num = 10 + str[i + 1] - '0';
	  card.push_back(num);
	  cnt[--num] ++;
	  i ++;
	}else{
	  int num = str[i] - '0';
	  card.push_back(num);
	  cnt[--num] ++;
	}
      } 
    }
    sort(card.begin(),card.end());
    int ans[2][2] = {0,0,0,0};
    int c1,c2;
    c1 = c2 = 0;
    bool straight = false;
    rep(i,cnt.size()){
      if(cnt[i] == 1 && 
	 cnt[i + 1] == 1 && 
	 cnt[i + 2] == 1 && 
	 cnt[i + 3] == 1 && 
	 cnt[i + 4] == 1){
	straight = true;
	break;
      }
      if(cnt[i] > 1 && c1 == 0)
	c1 = cnt[i];
      else if(cnt[i] > 1)
	c2 = cnt[i];
    }
    if(straight)
      cout<<"straight";
    else if(c1 == 5)
      cout<<"five card";
    else if(c1 == 4 || c2 == 4)
      cout<<"four card";
    else if((c1 == 3 && c2 == 2) || 
	    (c1 == 2 && c2 == 3)) 
      cout<<"full house";
    else if(c1 == 3)
      cout<<"three card";
    else if(c1 == 2 && c2 == 2)
      cout<<"two pair";
    else if(c1 == 2)
      cout<<"one pair";
    else if(cnt[ 9] == 1 && 
	    cnt[10] == 1 && 
	    cnt[11] == 1 && 
	    cnt[12] == 1 && 
	    cnt[ 0] == 1)
      cout<<"straight";
    else 
      cout<<"null";
    cout<<endl;
    
    }
}

C++: #include<bits/stdc++.h>

using namespace std;

int main()
{
  vector<int> poker;
  int check[15] = {0};
  int two = 0;
  int three = 0;
  int four = 0;
  int ans = 0;

  string trump;

  while(getline(cin,trump)){

  int a = 0;
  int b = 0;
  for(char e : trump){
    if(e == 49){
      if(b == 0){
        b = 1;
      }
      else{
        a = (e - 48) + 10;
        poker.push_back(a);
        b = 0;
      }
    }
    else if(48 <= e && 57 >= e){
      if(b == 1){
        a = (e - 48) + 10;
        b = 0;
      }
      else{
        a = e - 48;
      }
      poker.push_back(a);
    }
    else{
      if(b == 1){
        poker.push_back(b);
        b = 0;
      }
    }
  }
  
  if(b == 1){
    poker.push_back(b);
  }

  for(int e : poker){
    ++check[e];
  }
  check[14] = check[1];

  for(int i = 1;i < 14;++i){
    if(check[i] == 4){
      ++four;
    }
    else if(check[i] == 3){
      ++three;
    }
    else if(check[i] == 2){
      ++two;
    }
  }

  if(four == 1){
    cout<<"four card"<<endl;
    ans = 1;
  }
  else if(three == 1){
    ans = 1;
    if(two == 1){
      cout<<"full house"<<endl;
    }
    else{
      cout<<"three card"<<endl;
    }
  }
  else if(two == 2){
    ans = 1;
    cout<<"two pair"<<endl;
  }
  else if(two == 1){
    ans = 1;
    cout<<"one pair"<<endl;
  }
  else{
    for(int i = 1;i < 11;++i){
      if(check[i] == check[i+1] && check[i] == check[i+2] && check[i] == check[i+3] && check[i] == check[i+4] && check[i] != 0){
        cout<<"straight"<<endl;
        ans = 1;
        break;
      }
    }
  }

  if(ans == 0){
    cout<<"null"<<endl;
  }
  }

  return 0;
}

C++: #include<iostream>
#include<string>
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;
}

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

	int m=0;


	for(int i=0;i<5;++i){
		int n=0;

		if(s[m]==',' || s[m]=='\0'){
			cards[i] = n;
			++m;
			continue;
		}

		n += n*10 + s[m]-'0';
		++m;
		--n;
	}
}

int main(){

	string s, res;
	int card[5] = {1,2,3,4,5};
	

	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;
	}

	

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;

int a[5];

bool isStraight(){
	vector<int> n;
	for(int i=0 ; i<5 ; i++){
		n.push_back(a[i]);
	}
	sort( n.begin(), n.end() );
	if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
		return true;
	}
	if( n[0]==1 && n[1]==10 && n[2]==11 && n[3]==12 && n[4]==13){
		return true;
	}
	return false;
}

string checkCard(){
	int n, count, c[5];
	int c2=0, c3=0, c4=0;

	for(int j=0 ; j<5 ; j++){
		count = 0;
		n = a[j];
		for(int i=0 ; i<5 ; i++){
			if(a[i]==n)count++;
		}
		c[j] = count;
	}
	for(int i=0 ; i<5 ; i++){
		if(c[i]==2)c2++;
		if(c[i]==3)c3++;
		if(c[i]==4)c4++;
	}
	if(c4==4) return "four card";
	else if(c3==3 && c2==2) return "full house";
	else if( isStraight() ) return "straight";
	else if(c3==3) return "three card";
	else if(c2==4) return "two pair";
	else if(c2==2) return "one pair";
	else return "null";
}

int main(){
	string str;
	char s[80];
	while( scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4] ) != EOF ){
		str = checkCard();
		printf("%s\n",str.c_str());
	}
	return 0;
}