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 <vector>
#include <algorithm>
#include <string>
#include <sstream>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	std::vector<int> cards(5);

#if INPUT_FROM_FILE
	//std::ifstream ifs("test.txt");
	FILE *fp = fopen("test.txt", "r");
#endif


#if INPUT_FROM_FILE
	while(fscanf(fp,"%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4]) != EOF){
#else
	while(scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4]) != EOF){
#endif
		std::sort(cards.begin(), cards.end());

		//4cards
		if((cards[0] == cards[1] && cards[1] == cards[2] && cards[2] == cards[3]) ||
			(cards[1] == cards[2] && cards[2] == cards[3] && cards[3] == cards[4])){
			std::cout << "four card" << std::endl;
		}
		//full house
		else if((cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4]) ||
			(cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4])){
			std::cout << "full house" << std::endl;
		}
		else if((cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13) ||
			(cards[0] == (cards[1] - 1) && cards[1] == (cards[2] - 1) && cards[2] == (cards[3] - 1) && cards[3] == (cards[4] - 1))){
			std::cout << "straight" << std::endl;
		}
		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])){
			std::cout << "three card" << std::endl;
		}
		else{
			cards.erase(std::unique(cards.begin(), cards.end()), cards.end());
			if(cards.size() == 3){
				std::cout << "two pair" << std::endl;
			}
			else if(cards.size() == 4){
				std::cout << "one pair" << std::endl;
			}
			else{
				std::cout << "null" << std::endl;
			}
			cards.resize(5);
		}
		
	}

	return 0;
}

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

using namespace std;

void solve()
{
	int a[5];
	while(~scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]))
	{
		map<int, int> input;
		for(int i = 0; i < 5; ++i)
		{
			++input[a[i]];
		}
		vector<int> cards;
		map<int, int>::iterator it = input.begin();
		while(it != input.end())
		{
			cards.push_back(it->second);
			++it;
		}
		sort(cards.begin(), cards.end(), greater<int>());
		if(cards.size() == 2)
		{
			if(cards[0] == 4 && cards[1] == 1)
			{
				cout << "four card" << endl;
			}
			else if(cards[0] == 3 && cards[1] == 2)
			{
				cout << "full house" << endl;
			}
		}
		else if(cards.size() == 3)
		{
			if(cards[0] == 3 && cards[1] == 1 && cards[2] == 1)
			{
				cout << "three card" << endl;
			}
			else if(cards[0] == 2 && cards[1] == 2 && cards[2] == 1)
			{
				cout << "two pair" << endl;
			}
		}
		else if(cards.size() == 4)
		{
			cout << "one pair" << endl;
		}
		else
		{
			int b[5];
			int pos = 0;
			map<int, int>::iterator it = input.begin();
			while(it != input.end())
			{
				b[pos] = it->first;
				++it;
				++pos;
			}
			if(b[1] == b[0] + 1 && b[2] == b[1] + 1 && b[3] == b[2] + 1 && b[4] == b[3] + 1 ||
			   b[0] == 1 && b[1] == 10 && b[2] == 11 && b[3] == 12 && b[4] == 13)
			{
				cout << "straight" << endl;
			}
			else
			{
				cout << "null" << endl;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

int main() {
	int card[5];
	int yaku[15] = {0};
	
	while ( ~scanf ("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) ){
		for ( int i = 1; i < 15; i++ ) {
			yaku[i] = 0;
		}
		
		for ( int i = 0; i < 5; i++ ) {
			if ( card[i] == 1 ) yaku[14]++;
			yaku[card[i]]++;
		}
		
		/*for ( int i = 1; i < 15; i++ ) {
			if ( yaku[i] > 0 ) {
				cout << i << " " << yaku[i] << endl;
			}
		}*/
		
		for ( int i = 1; i < 15; i++ ) {
			if ( yaku[i] == 4 ){
				cout << "four card" << endl;
				goto END;
			} else if ( yaku[i] == 3 ) {
				for ( int j = 1; j < 14; j++ ) {
					if ( yaku[j] == 2 ) {
						cout << "full house" << endl;
						goto END;
					}
				}
			} else if ( yaku[i] == 1 ) {
				for ( int j = 1; j < 5; j++ ) {
					if ( yaku[i + j] != 1 )
						break;
					else if ( j == 4 ) {
						cout << "straight" << endl;
						goto END;
					}
				}
			}
		}
		for ( int i = 1; i < 15; i++ ) {
			if ( yaku[i] == 3 ) {
				cout << "three card" << endl;
				goto END;
			} else if ( yaku[i] == 2 ) {
				for ( int j = i + 1; j < 14; j++ ) {
					if ( yaku[j] == 2 ) {
						cout << "two pair" << endl;
						goto END;
					}else if ( j == 13 ){
						cout << "one pair" << endl;
						goto END;
					}
				}
			}
		}
		cout << "null" << endl;
		END:;
	}
}