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 <bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<(n);++i)
#define loop for(;;)
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;
#define inf (1e9)
#define eps (1e-9)

template<class S, class T> inline
ostream& operator<<(ostream&os, pair<S,T> p) {
  return os << '(' << p.first << ", " << p.second << ')';
}

template<class S, class T, class U> inline
ostream& operator<<(ostream&os, tuple<S,T,U> t) {
  return os << '('
    << get<0>(t) << ", "
    << get<1>(t) << ", "
    << get<2>(t) << ')';
}

template<class T> inline
ostream& operator<<(ostream&os, vector<T> v) {
  if (v.size() == 0) { return os << "(empty)"; }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

template<class T> inline
istream& operator>>(istream&is, vector<T>&v) {
  rep (i, v.size()) is >> v[i];
  return is;
}

//           ^   >  v   <
int dx[] = { -1, 0, 1,  0 };
int dy[] = {  0, 1, 0, -1 };

typedef vector<int> vi;
int memo[20];

bool fourcard(vi&xs) {
  rep (i, 20) memo[i] = 0;
  for (int x: xs) memo[x]++;
  bool res = false;
  rep (i, 20) if (memo[i] == 4) res = true;
  return res;
}

bool straight(vi&xs) {
  {
    bool res = true;
    rep (i, xs.size()) {
      if (xs[i] != xs[0] + i) res = false;
    }
    if (res) return true;
  }
  if (xs[0] == 1) {
    bool res = true;
    for (int i = 1; i < xs.size(); ++i) {
      if (xs[i] != 9 + i) res = false;
    }
    if (res) return true;
  }
  return false;
}

bool fullhouse(vi&xs) {
  if ( xs[0] == xs[1] and xs[2] == xs[3] and xs[3] == xs[4]) return true;
  if ( xs[0] == xs[1] and xs[1] == xs[2] and xs[3] == xs[4]) return true;
  return false;
}

bool three(vi&xs) {
  int n = 0;
  rep (i, xs.size()) {
    int m = 0;
    for (int j = i; j < xs.size(); ++j) {
      if (xs[i] == xs[j]) ++m;
      else break;
    }
    n = max(n, m);
  }
  return n >= 3;
}

bool two(vi&xs) {
  rep (i,20) memo[i] = 0;
  for (int x: xs) memo[x]++;

  int m = 0;
  rep (i,20) if (memo[i] == 2) ++m;
  return m == 2;
}

bool one(vi&xs) {
  rep (i,20) memo[i] = 0;
  for (int x: xs) memo[x]++;

  int m = 0;
  rep (i,20) if (memo[i] == 2) ++m;
  return m == 1;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout.setf(ios::fixed);
  cout.precision(10);
  random_device dev;
  mt19937 rand(dev());

  int a,b,c,d,e;
  char comma;
  while (cin>>a>>comma>>b>>comma>>c>>comma>>d>>comma>>e) {
    vi xs = {a,b,c,d,e};
    sort(begin(xs), end(xs));
    if (fourcard(xs)) {
      cout << "four card" << endl;
    } else if (fullhouse(xs)) {
      cout << "full house" << endl;
    } else if (straight(xs)) {
      cout << "straight" << endl;
    } else if (three(xs)) {
      cout << "three card" << endl;
    } else if (two(xs)) {
      cout << "two pair" << endl;
    } else if (one(xs)) {
      cout << "one pair" << endl;
    } else {
      cout << "null" << endl;
    }
  }

  return 0;
}

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

int main() {
	int ar[5];
	while (scanf("%d,%d,%d,%d,%d", &ar[0], &ar[1], &ar[2], &ar[3], &ar[4])!=EOF) {
		sort(ar, ar + 5);
		int a = ar[0];
		int b = ar[1];
		int c = ar[2];
		int d = ar[3];
		int e = ar[4];

		if (a == d || b == e) { cout << "four card" << endl; }
		else if (a == c && d == e) { cout << "full house" << endl; }
		else if (a == b && c == e) { cout << "full house" << endl; }
		else if (b - a == 1 && c - b == 1 && d - c == 1 && e - d == 1&&a!=1 ) { cout << "straight" << endl; }
		else if (a == 1 && b == 10 && c == 11 && d == 12 && e == 13) { cout << "straight" << endl; }
		else if (a == c || b == d || c == e) { cout << "three card" << endl; }
		else if (a==b&&c==d) { cout << "two pair" << endl; }
		else if (a == b&&d == e) { cout << "two pair" << endl; }
		else if (b == c&&d == e) { cout << "two pair" << endl; }
		else if (a == b || b == c || c == d || d == e) { cout << "one pair" << endl; }
		else { cout << "null" << endl; }
	}
	return 0;
}