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++: <?php

while (TRUE) {
    $c = fscanf(STDIN, '%d,%d,%d,%d,%d');
    if (feof(STDIN)) {
        break;
    }
    sort($c);
    $hash = array();
    $max = 0;
    foreach ($c as $v) {
        if (!isset($hash[$v])) {
            $hash[$v] = 0;
        }
        $hash[$v]++;
        $max = $hash[$v] > $max ? $hash[$v] : $max;
    }
    arsort($hash);
    $combo = 'null';
    if ($max >= 2) {
        $combo = 'one pair';
    }
    if ($max >= 2 && count($hash) <= 3) {
        $combo = 'two pair';
    }
    if ($max >= 3) {
        $combo = 'three card';
    }
    if (count($hash) === 5 && isStraight($c)) {
        $combo = 'straight';
    }
    if ($max >= 3 && count($hash) <= 2) {
        $combo = 'full house';
    }
    if ($max >= 4) {
        $combo = 'four card';
    }
    echo $combo . PHP_EOL;
}

function isStraight($cards) {
    if (max($cards) - min($cards) === 4) {
        return true;
    }
    if ($cards[0] === 1 && $cards[1] === 10 && $cards[4] === 13) {
        return true;
    }
    return false;
}

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

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

void init(){
  for(int i = 0; i < 13; i++){
    h[i] = 0;
  }
  one = false;
  two = false;
  three = false;
  full = false;
  four = false;
  straight = false;
}

void judge(){
  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;
}

int main(void){
  while(scanf("%d,%d,%d,%d,%d", cnt, cnt+1, cnt+2, cnt+3, cnt+4) != EOF){
    init();
    for(int i = 0; i < 5; i++){
      h[cnt[i]-1]++;
    }
    
    for(int i = 0; i < 5; i++){
      cnt[i] = 0;
    }

    judge();
 
    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<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];	

	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;

	

	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;


int c[5];
int counts[14];
int countscounts[4];

bool IsFourCard()
{
	return countscounts[4] == 1;
}
bool IsFullHouse()
{
	return countscounts[3] == 1 && countscounts[2] == 1;
}
bool IsStraight()
{
	for (int i = 0; i < 4; ++i)
	{
		if (c[i]+1 != c[i+1])
		{
			int t[] = { 1, 10, 11, 12, 13 };
			for (int j = 0; j < 5; ++j)
			{
				if (c[j] != t[j])
					return false;
			}
			return true;
		}
	}
	return true;
}
bool IsThreeCard()
{
	return countscounts[3] == 1;
}
bool IsTwoPair()
{
	return countscounts[2] == 2;
}
bool IsOnePair()
{
	return countscounts[2] == 1;
}
bool IsNull()
{
	return true;
}

int main()
{
	while (scanf("%d,%d,%d,%d,%d", c, c+1, c+2, c+3, c+4) != EOF)
	{
		sort(c, c+5);
		memset(counts, 0, sizeof(counts));
		memset(countscounts, 0, sizeof(countscounts));
		for (int i = 0; i < 5; ++i)
			++counts[c[i]];
		for (int i = 1; i < 14; ++i)
			++countscounts[counts[i]];

		bool (*judge[])() = { IsFourCard, IsFullHouse, IsStraight
			, IsThreeCard, IsTwoPair, IsOnePair, IsNull };
		char* names[] = { "four card", "full house", "straight"
			, "three card", "two pair", "one pair", "null" };
		for (int i = 0; i < sizeof(judge)/sizeof(judge[0]); ++i)
		{
			if (judge[i]())
			{
				puts(names[i]);
				break;
			}
		}
	}
	return 0;
}