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<algorithm>

using namespace std;

int main(void){
	
	string yaku[]={"one pair","two pair","three card","full house","four card","straight","null"};
	int tefuda[5],count[14];
	bool flag,straight;

	while(scanf("%d,%d,%d,%d,%d",&tefuda[0],&tefuda[1],&tefuda[2],&tefuda[3],&tefuda[4])!=EOF){
		
		flag=true;
		straight=true;
		
		memset(count,0,sizeof(count));
		//sort
		sort(tefuda,tefuda+5);
		//1-4 pair or fullhouse 
		for(int i=0;i<4;i++){
			for(int j=i+1;j<5;j++){
				if(tefuda[i]==tefuda[j]){
					count[tefuda[i]]++;
					flag=false;
				}	
			}
		}
		

		//straight
		if(flag){
			if(tefuda[0]==1 && tefuda[1]==2){
				for(int i=2;i<5;i++){
					if(tefuda[i]!=i+1){
						straight=false;
					}
				}
			}
			else if(tefuda[0]==1 && tefuda[4]==13){
				for(int i=1;i<4;i++){
					if(tefuda[i]!=i+9){
						straight=false;
					}
				}
			}
			else{
				for(int i=tefuda[0];i<5+tefuda[0];i++){
					if(tefuda[i-tefuda[0]]!=i){
						straight=false;
					}
				}	
			}
			
			if(straight){
				cout<<yaku[5]<<endl;	//straight
				//break;
			}
			else{
				cout<<yaku[6]<<endl;	//null
				//break;
			}
		}
		else{
			sort(count,count+14);
			if(count[13]==6){
				cout<<yaku[4]<<endl;
			}else if(count[12]==1 && count[13]==3){
				cout<<yaku[3]<<endl;
			}else if(count[12]==0 && count[13]==3){
				cout<<yaku[2]<<endl;
			}else if(count[12]==count[13]){
				cout<<yaku[1]<<endl;
			}else if(count[12]<2 && count[13]==1){
				cout<<yaku[0]<<endl;
			}
		}

	}
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
#include<array>

using namespace std;


bool isStraight( const array<int,5>& cs )
{
  if ( cs[0] == 1 && cs[1] == 10 && cs[2] == 11 && cs[3] == 12 && cs[4] == 13 )
    return true;
  
  for ( auto i = 0; i < 4; ++i )
    {
      if ( cs[i] + 1 != cs[i+1] )
        return false;
    }

  return true;
}

bool isOnePair( const array<int,5>& cs )
{
  for ( auto i = 0; i < 4; ++i )
    {
      if ( cs[i] == cs[i+1] )
        return true;
    }

  return false;
}

bool isTwoPair( const array<int,5>& cs )
{
  for ( auto i = 0; i < 2; ++i )
    {
      for ( auto j = i + 2; j < 4; ++j )
        {
          if ( cs[i] == cs[i+1] && cs[j] == cs[j+1] )
            return true;
        }
    }

  return false;
}

bool isThreeCard( const array<int,5>& cs )
{
  for ( auto i = 0; i < 3; ++i )
    {
      if ( cs[i] == cs[i+1] && cs[i+1] == cs[i+2] )
        return true;
    }

  return false;
}

int main()
{
  array<int,5> card;
  char c;

  while ( cin >> card[0] >> c >> card[1] >> c >> card[2] >> c >> card[3] >> c >> card[4] )
    {
      sort( card.begin(), card.end() );
      
      if ( card[0] == card[1] && card[1] == card[2] && card[2] == card[3] )
        cout << "four card" << endl;
      else if ( card[1] == card[2] && card[2] == card[3] && card[3] == card[4] )
        cout << "four card" << endl;
      else if ( card[0] == card[1] && card[1] == card[2] && card[3] == card[4] )
        cout << "full house" << endl;
      else if ( card[0] == card[1] && card[2] == card[3] && card[3] == card[4] )
        cout << "full house" << endl;
      else if ( isStraight( card ) )
        cout << "straight" << endl;
      else if ( isThreeCard( card ) )
        cout << "three card" << endl;
      else if ( isTwoPair( card ) )
        cout << "two pair" << endl;
      else if ( isOnePair( card ) )
        cout << "one pair" << endl;
      else
        cout << "null" << endl;
    }
  
  return 0;
}

C++: def function(a,b,c,d,e):
	A=[a,b,c,d,e]
	A.sort()
	if A[0]==A[3] or A[1]==A[4]:
		print("four card")
	elif (A[0]==A[1] and A[2]==A[4]) or (A[0]==A[2] and A[3]==A[4]):
		print("full house")
	elif A[0]==A[2] or A[1]==A[3] or A[2]==A[4]:
		print("three card")

	elif (A[0]==A[1] and A[2]==A[3]) or (A[0]==A[1] and A[3]==A[4]) or (A[1]==A[2] and A[3]==A[4]):
		print("two pair")
	elif A[0]==A[1] or A[1]==A[2] or A[2]==A[3] or A[3]==A[4]:
		print("one pair")
	elif A==[1,10,11,12,13]:
		print("straight")
	elif A[0]==A[1]-1==A[2]-2==A[3]-3==A[4]-4:
		print("straight")
	else:
		print("null")

while True:
	try:
		a,b,c,d,e=map(int,input().split(','))
		function(a,b,c,d,e)
	except EOFError:
		break

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

bool str(int a[])
{
	if((a[0]==a[1]+1&&a[1]==a[2]+1&&a[2]==a[3]+1&&a[3]==a[4]+1)){
		return true;
	}else if(a[0]==13&&a[1]==12&&a[2]==11&&a[3]==10&&a[4]==1){
		return true;
	}else{
		return false;
	}
}
		
			

int main()
{
	int a[5];
	int count;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4]) != EOF){
		count = 0;
		sort(a,a+5,greater<int>());
		for(int i=0;i<4;++i){
			for(int j=i+1;j<5;++j){
				if(a[i]==a[j])count++;
			}
		}
		
		switch(count){
		  case 6:
			cout << "four card" << endl;
			break;
		  case 4:
			cout << "full house" << endl;
			break;
		  case 3:
			cout << "three card" << endl;
			break;
		  case 2:
			cout << "two pair" << endl;
			break;
		  case 1:
			cout << "one pair" << endl;
			break;
		  default:
			if(str(a)){
				cout << "straight" << endl;
			}else{
				cout << "null" << endl;
			}
		}
	}
}