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<algorithm>
using namespace std;

int main(){

	int card[5], cnt, max_cnt, min_cnt, cnt_one;
	char cnm;

	while(cin >> card[0]){
		cnt = 1;
		for(int i=1; i<9; i++){
			if(i % 2 == 0){
				cin >> card[cnt];
				cnt++;
			}
			else cin >> cnm;
		}
		
		sort(card, card + 5);
		max_cnt = 1;
		min_cnt = 5;
		cnt_one = 0;
		cnt = 1;
		for(int i=0; i<4; i++){
			if(card[i] == card[i+1]) cnt++;
			else {
				min_cnt = min(min_cnt, cnt);
				if(cnt == 1) cnt_one++;
				cnt = 1;
			}
			max_cnt = max(max_cnt, cnt);
		}
		if(card[3] != card[4]) cnt_one++;

		if(max_cnt == 4) cout << "four card" << endl;
		else if(max_cnt == 3){
			if(min_cnt == 1) cout << "three card" << endl;
			else cout << "full house" << endl;
		}
		else if(max_cnt == 2){
			if(cnt_one == 3) cout << "one pair" << endl;
			else cout << "two pair" << endl;
		}
		else if(card[0] + 4 == card[4] || (card[0] == 1 && card[1] == 10)){
			cout << "straight" << endl;
		}
		else cout << "null" << endl;
	}

	return 0;

}

C++: // 2011/07/12 Tazoe

#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main()
{
	while(true){
		string str;
		cin >> str;
		if(cin.eof())
			break;

		for(int i=0; i<str.size(); i++)
			if(str[i]==',')
				str[i] = ' ';

		istringstream ist(str);
		int num[5];
		for(int i=0; i<5; i++)
			ist >> num[i];

		for(int i=0; i<4; i++)
			for(int j=i+1; j<5; j++)
				if(num[i]>num[j]){
					int tmp = num[i];
					num[i] = num[j];
					num[j] = tmp;
				}

		if(num[0]==num[1]&&num[1]==num[2]&&num[2]==num[3])
			cout << "four card" << endl;
		else if(num[1]==num[2]&&num[2]==num[3]&&num[3]==num[4])
			cout << "four card" << endl;
		else if(num[0]==num[1]&&num[1]==num[2]&&num[3]==num[4])
			cout << "full house" << endl;
		else if(num[0]==num[1]&&num[2]==num[3]&&num[3]==num[4])
			cout << "full house" << endl;
		else if(num[0]+1==num[1]&&num[1]+1==num[2]&&num[2]+1==num[3]&&num[3]+1==num[4])
			cout << "straight" << endl;
		else if(num[0]==1&&num[1]==10&&num[2]==11&&num[3]==12&&num[4]==13)
			cout << "straight" << endl;
		else if(num[0]==num[1]&&num[1]==num[2])
			cout << "three card" << endl;
		else if(num[1]==num[2]&&num[2]==num[3])
			cout << "three card" << endl;
		else if(num[2]==num[3]&&num[3]==num[4])
			cout << "three card" << endl;
		else if(num[0]==num[1]&&num[2]==num[3])
			cout << "two pair" << endl;
		else if(num[0]==num[1]&&num[3]==num[4])
			cout << "two pair" << endl;
		else if(num[1]==num[2]&&num[3]==num[4])
			cout << "two pair" << endl;
		else if(num[0]==num[1])
			cout << "one pair" << endl;
		else if(num[1]==num[2])
			cout << "one pair" << endl;
		else if(num[2]==num[3])
			cout << "one pair" << endl;
		else if(num[3]==num[4])
			cout << "one pair" << endl;
		else
			cout << "null" << endl;
	}

	return 0;
}

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

int h[13], cnt[5];
bool four = false, full = false, three = false, two = false, one = false, straight = false;

int main(void){
  scanf("%d,%d,%d,%d,%d", cnt, cnt+1, cnt+2, cnt+3, cnt+4);
  for(int i = 0; i < 5; i++){
    h[cnt[i]-1]++;
  }
  
  for(int i = 0; i < 13; i++){
    if(h[i] == 2) one = true;
  }
  
  for(int i = 0; i < 13; i++){
    if(h[i] == 3) three = true;
  }

  for(int i = 0; i < 13; i++){
    for(int j = 0; j < 13; j++){
      if(h[i] == 2 && h[j] == 2 && i != j)  two = true;
      if(h[i] == 3 && h[j] == 2 && i != j)  full = true;
    }
  }
  
  for(int i = 0; i < 13; i++){
    if(h[i] == 4) four = true;
  }
  
  for(int i = 0; i < 9; i++){
    if(h[i] != 0 && h[i+1] != 0 && h[i+2] != 0 && h[i+3] != 0 && h[i+4] != 0) straight = true;
  }
  
  if(h[0] != 0 && h[12] != 0 && h[11] != 0 && h[10] != 0 && h[9] != 0)  straight = true;
 
  if(straight){
    cout << "straight" << endl;
  }else if(four){
    cout << "four card" << endl;
  }else if(full){
    cout << "full house" << endl;
  }else if(three){
    cout << "three card" << endl;
  }else if(two){
    cout << "two pair" << endl;
  }else if(one){
    cout << "one pair" << endl;
  }else{
    cout << "null" << endl;
  }
  return 0;
}

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

int main()
{
	int card[5];
	
	while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
	 	
		int a[20];
		std::fill( a, a + 20, 0 );
		int c = 0;
		
		for( int i = 0; i < 5; i++ ) a[card[i]]++;
		
		for( int i = 0; i < 5; i++ ){
			 c = std::max( c, std::count( card, card + 5, card[i] ) );
		}
		
		bool f = false;
		int m;
		
		switch( c ){
			case 4:
		 		puts( "four card" );
				break;
			case 3:
				for( int i = 0; i < 5; i++ ){
			 		if( std::count( card, card + 5, card[i] ) == 2 ){
						f = true; 
						break;
					}
				}
				
				if( f ){
				 	puts( "full house" );
				}
				else{
				 	puts( "three card" );
				}
				break;
			case 2:
				for( int i = 0; i < 5; i++ ){
					if( std::count( card, card + 5, card[i] ) == 2 && !f ){
					 	m = card[i];
						f = true;
					}
					if( card[i] != m && std::count( card, card + 5, card[i] ) == 2 && f ){
						puts( "two pair" );
						goto end;
					}
				}
				puts( "one pair" );
				break;
			case 1:	
				for( int i = 1; i <= 10; i++ ){
					if( a[i] == 1 && a[i+1] == 1 && a[i+2] == 1 && a[i+3] == 1 && a[(i+4)%13] == 1 ) f = true;
				}
				
				if( f ){
				 	puts( "straight" );
				}
				else{
					puts( "null" );
				}
				
				break;
		}
		
	end:
	}

 	return 0;
}