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 <list>
#include <algorithm>
#include <string>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <complex>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59

vector<string> v;

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    //cout << fixed << setprecision(3);

    int a, b, c, d, e;
    while (scanf("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF)
    {
        int arr[14];
        for (int i = 0; i < 14; ++i)
            arr[i] = 0;

        arr[a]++;
        arr[b]++;
        arr[c]++;
        arr[d]++;
        arr[e]++;

        bool checked = false;
        for (int i = 1; i <= 13; ++i)
        {
            if (arr[i] == 4)
            {
                cout << "four card" << endl;
                checked = true;
            }
        }
        if (checked)
            continue;

        bool two = false, two2 = false, three = false;
        for (int i = 1; i <= 13; ++i)
        {
            if (two == true && arr[i] == 2)
                two2 = true;
            if (arr[i] == 2)
                two = true;

            if (arr[i] == 3)
                three = true;
        }
        if (two && three)
        {
            cout << "full house" << endl;
            checked = true;
        }
        if (checked)
            continue;

        bool str = false;

        for (int i = 1; i <= 13 - 4; ++i)
        {
            if (arr[i] == 1 && arr[i + 1] == 1 && arr[i + 2] == 1 && arr[i + 3] == 1 && arr[i + 4] == 1)
                str = true;
        }

        if (str == true || (arr[1] == 1 && arr[1] == arr[2] && arr[2] == arr[3] && arr[3] == arr[4] && arr[4] == arr[5]) || (arr[1] == 1 && arr[1] == arr[10] && arr[10] == arr[11] && arr[11] == arr[12] && arr[12] == arr[13]))
        {
            cout << "straight" << endl;
            checked = true;
        }

        if (checked)
            continue;

        if (three)
        {
            cout << "three card" << endl;
            checked = true;
        }
        if (checked)
            continue;

        if (two && two2)
        {
            cout << "two pair" << endl;
            checked = true;
        }
        if (checked)
            continue;

        if (two)
        {
            cout << "one pair" << endl;
            checked = true;
        }
        if (checked)
            continue;

        cout << "null" << endl;
    }
    return 0;
}

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

int main() {

  int in0, in1, in2, in3, in4;
  char in;

  while( cin >> in0 >> in >> in1 >> in >> in2 >> in >> in3 >> in >> in4 ) {

    vector< int > hand;

    hand.push_back( in0 );
    hand.push_back( in1 );
    hand.push_back( in2 );
    hand.push_back( in3 );
    hand.push_back( in4 );
    sort( hand.begin(), hand.end() );

    bool flag = false;
    if ( ( hand[1] == hand[2] && hand[2] == hand[3] ) && ( hand[2] == hand[0] || hand[2] == hand[4] ) ) {
      cout << "four card" << endl;
      continue;
    }
    if ( ( hand[0] == hand[1] && hand[3] == hand[4] ) && ( hand[2] == hand[0] || hand[2] == hand[4] ) ) {
      cout << "full house" << endl;
      continue;
    }
    for ( int i = 0; i < 4; i++ ) {
      if ( hand[3-i] != hand[4] - i - 1 ) break;
      if ( i == 3 ) {
	cout << "straight" << endl;
	flag = true;
	break;
      }
    }
    if ( flag ) continue;
    if ( hand[0] == 1 && hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13 ) {
      cout << "straight" << endl;
      continue;
    }
    for ( int i = 0; i < 3; i++ ) {
      if ( hand[i] == hand[i+1] && hand[i] == hand[i+2] ) {
	cout << "three card" << endl;
	flag = true;
	break;
      }
    }
    if ( flag ) continue;
    int c = 0;
    for ( int i = 0; i < 4; i++ ) {
      if ( hand[i] == hand[i+1] ) c++;
    }
    if ( c == 1 ) {
      cout << "one pair" << endl;
      continue;
    }else if ( c == 2 ) {
      cout << "two pair" << endl;
      continue;
    }else if ( c == 0 ) {
      cout << "null" << endl;
      continue;
    }
  }

  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[5];

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()
{
	bool (*judge[])() = { IsFourCard, IsFullHouse, IsStraight
		, IsThreeCard, IsTwoPair, IsOnePair, IsNull };
	char* names[] = { "four card", "full house", "straight"
		, "three card", "two pair", "one pair", "null" };

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

		for (int i = 0; i < sizeof(judge)/sizeof(judge[0]); ++i)
		{
			if (judge[i]())
			{
				puts(names[i]);
				break;
			}
		}
	}
	return 0;
}