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 <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int card[5];
int main()
{
  while(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) !=EOF){
    sort(card,card+5);
    bool four,one,two,three,full,straight,flag;
    flag = false;
    one = two = three =four= full =straight = false;
    if(!flag){
      if(card[0]==card[1]&&card[0]==card[2]&&card[0]==card[3]||card[1]==card[2]&&card[1]==card[3]&&card[1]==card[4]){
	four = true;
	flag = true;
      }else if(card[0]==card[1]&&card[0]==card[2]&&(card[3]==card[4])||card[0]==card[1]&&card[2]==card[3]&&card[2]==card[4]){
	full = true;
	flag = true;
      }else if(card[0]==1&&card[1]==10&&card[2]==11&&card[3]==12&&card[4]==13||card[1]==card[0]+1&&card[2]==card[0]+2&&card[3]==card[0]+3&&card[4]==card[0]+4){
	straight = true;
	flag = true;
      }else if(card[0]==card[1]&&card[0]==card[2]||card[1]==card[2]&&card[1]==card[3]||card[2]==card[3]&&card[2]==card[4]){
	three = true;
	flag = true;
      }else if(card[0]==card[1]&&(card[2]==card[3]||card[3]==card[4])||card[1]==card[2]&&card[3]==card[4]){
	two = true;
	flag = true;
      }else if(card[0]==card[1]||card[1]==card[2]&&card[2]==card[3]||card[3]==card[4]){
	one = true;
	flag = true;
      }
    }
    if(!flag)
      cout <<"null"<<endl;
    else if(four)
      cout <<"four card"<<endl;
    else if(full)
      cout <<"full house"<<endl;
    else if(straight)
      cout <<"straight"<<endl;
    else if(three)
      cout <<"three card"<<endl;
    else if(two)
      cout <<"two pair"<<endl;
    else if(one)
      cout <<"one pair"<<endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using ll  = long long;
#define int ll
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define erep(e,v) for(auto && e :v)
#define all(in) in.begin(), in.end()
#define MP make_pair
#define INF (sizeof(int) == 4 ? (int)1e9:(int)1e18)
#define EPS 0.0000000001
using namespace std;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
template<class T> void join(T a){for(auto itr :a){if(itr != *a.begin())cout << " "; cout << itr;} }
using ld  = long double;
using pii = pair<int,int>;
using piii = pair<int,pii>;
int W,H;
int dx[]={0,0,1,-1}, dy[]={1,-1,0,0};
bool valid(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
auto isValid(vector<int>v){
    vector<int>st = {1,10,11,12,13};
    if(v.back() - v.front() == 4 or v == st)return true;
    else return false;
}
signed main(){
    vector<int>v(5);
    char gomi;
    while(cin >> v[0] >> gomi >> v[1] >> gomi >> v[2] >> gomi >> v[3]  >> gomi >> v[4]){
        sort(all(v));
        auto u = v;
        u.erase(unique(all(u)),u.end());
        if(u.size() == 2){
            if(v.front() != v[1] or v.back() != v[3]){
                cout << "four card" << endl;
            } else {
                cout << "full house" << endl;
            }
        } else if(u.size() == 5 and isValid(v)){
            
            cout << "straight" << endl;
            
        }else if(u.size() == 3){
            
            bool flag = false;
            rep(i,v.size())
                if(i and i+1 != v.size() and v[i-1] == v[i] and v[i] == v[i+1]) flag = true;
            
            if(flag)cout << "three card" << endl;
            else cout << "two pair" << endl;
            
        } else if(u.size() == 4){
            cout << "one pair" << endl;
        }
        else cout << "null" << endl;
    }
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	vector<int> H(5);
		while(~scanf("%d,%d,%d,%d,%d", &H[0] ,&H[1] ,&H[2] ,&H[3] ,&H[4]))
		{
			vector<int> L(32, 0);
			int kind = 0;
			for(int i = 0; i < 5; i++)
			{
				if(L[H[i]-1] == 0)
				{
					kind++;
				}
				L[H[i]-1]++;
			}

			if(kind == 2)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 4)
				{
					cout << "four pair" << endl;
					continue;
				}
				else if(mx == 3)
				{
					cout << "full house" << endl;
					continue;
				}
				cout << "error 1" << endl;
			}
			else if(kind == 5)
			{
				bool straight = false;
				for(int i = 0; i < 9; i++)
				{
					L[13] = L[0];
					if(L[i] && L[i+1] && L[i+2] && L[i+3] && L[i+4])
					{
						straight = true;
					}
				}
				if(straight)
				{
					cout << "straight" << endl;
					continue;
				}
				else
				{
					cout << "null" << endl;
					continue;
				}
			}
			else if(kind == 3)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 3)
				{
					cout << "three card" << endl;
					continue;
				}
				else if(mx == 2)
				{
					cout << "two pair" << endl;
					continue;
				}
			}
			else if(kind == 4)
			{
				cout << "one pair" << endl;
				continue;
			}
		}
}