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 <cstdio>
#include <algorithm>
using namespace std;

int main(){
	int c[5];
	int i, n, s;
	while(~scanf("%d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4])){
		sort(c, c+5);
		n = 0;
		s = 0;
		for (i = 0; i < 4; i++) {
			if(c[i] == c[i+1]){
				n++;
			}
			if(c[i]+1 == c[i+1]){
				s++;
			}
		}
		if (n == 3 && c[1] == c[3]) {
			cout << "four card" << endl;
		}else if (n == 3) {
			cout << "full house" << endl;
		}else if (s == 4 || (s==3 && c[0] == 1 && c[1]==10 && c[4]==13)) {
			cout << "straight" << endl;
		}else if (n == 2 && (c[0]==c[2] || c[1]==c[3] || c[2]==c[4])) {
			cout << "three card" << endl;
		}else if (n == 2) {
			cout << "two pair" << endl;
		}else if(n ==1){
			cout << "one pair" << endl;
		}else{
			cout << "null" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <map>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

vector<string> split(const string &str, char delim){
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos){
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}


int main()
{
	string s;
	while(cin >> s)
	{
		vector<string> _s = split(s,',');
		vector<int> n;
		map<int,int> m;
		rep(i,_s.size())
		{
			n.push_back(atoi(_s[i].c_str()));
		}

		sort(n.begin(),n.end());
		
		rep(i,n.size())
		{
			m[n[i]]++;
		}

		if(m.size() == 2)
		{
			if(m[n[0]] == 1 || m[n[0]] == 4)
			{
				cout << "four card" << endl;
			}
			else
			{
				cout << "full house" << endl;
			}
		}

		else if(m.size() == 3)
		{
			bool flag = true;
			rep(i,n.size())
			{
				if(m[n[i]] == 3)
				{
					flag = false;
				}
			}

			if(flag)
			{
				cout << "two pair" << endl;
			}
			else
			{
				cout << "three card" << endl;
			}
		}

		else if(m.size() == 4)
		{
			cout << "one pair" << endl;
		}

		else if(m.size() == 5)
		{
			if(n[0] == 1 && n[1] == 10 && n[2] == 11 && n[3] == 12 && n[4] == 13)
			{
				cout << "straight" << endl;
			}
			else if(n[1] == n[0]+1 && n[2] == n[1]+1 && n[3] == n[2]+1 && n[4] == n[3]+1)
			{
				cout << "straight" << endl;
			}
			else
			{
				cout << "null" << endl;
			}
		}

	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

int a;
vi n(5);
char t;

int main(){
	while(cin>>a){
		vi vec,tmp;
		n[0]=a;
		vec.push_back(a);
		for(int i=1;i<5;i++){
			cin>>t>>n[i];
			bool used=1;
			for(int j=0;j<vec.size();j++){
				if(n[i]==vec[j]) used=0;
			}
			if(used) vec.push_back(n[i]);
			else tmp.push_back(n[i]);
		}
		if(vec.size()==4){
			cout<<"one pair"<<endl;;
			continue;
		}
		if(vec.size()==3){
			if(tmp[0]==tmp[1]) cout<<"three card"<<endl;
			else cout<<"two pair"<<endl;
			continue;
		}
		if(vec.size()==2){
			if(tmp[0]==tmp[1]&&tmp[1]==tmp[2]) cout<<"four card"<<endl;
			else cout<<"full house"<<endl;
			continue;
		}
		sort(n.begin(),n.end());
		int tmpn=0;
		for(int i=1;i<4;i++){
			if(n[i]+1==n[i+1]) tmpn++;
		}
		if((n[0]==1&&n[1]==10)||n[0]+1==n[1]) tmpn++;
		cout<<tmpn<<endl;
		if(tmpn==4){
			cout<<"straight"<<endl;
			continue;
		}
		cout<<"null"<<endl;
	}
}

C++: #include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define REP(i,n) for(int i=0;i<(int)(n);i++)

using namespace std;
const int MAX_N=5;
const int BINS=13;
int main(){ _;
  int a[MAX_N];
  int b[BINS+1];
  while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=-1){
    REP(i,BINS+1) b[i]=0;
    REP(i,MAX_N) b[a[i]-1]++;
    b[13]=b[0];
    for(int i=0;i<BINS;i++)
      if(b[i]==4){
	cout<<"four card"<<endl;
	goto NEXT;
      }
    for(int i=0;i<BINS;i++)
      for(int j=0;j<BINS;j++)
	if(b[i]==2&&b[j]==3){
	  cout<<"full house"<<endl;
	  goto NEXT;
	}
    for(int i=0;i<10;i++)
      if(b[i]==1&&b[i+1]==1&&b[i+2]==1&&b[i+3]==1&&b[i+4]==1){
	cout<<"straight"<<endl;
	goto NEXT;
      }
    for(int i=0;i<BINS;i++)
      if(b[i]==3){
	cout<<"three card"<<endl;
	goto NEXT;
      }
    for(int i=0;i<BINS;i++)
      for(int j=0;j<BINS;j++)
	if(i!=j&&b[i]==2&&b[j]==2){
	  cout<<"two pair"<<endl;
	  goto NEXT;
	}
    for(int i=0;i<BINS;i++)
      if(b[i]==2){
	cout<<"one pair"<<endl;
	goto NEXT;
      }
    cout<<"null"<<endl;
  NEXT:;
  }
}

C++: #include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;

int main() {
	char ch;
	vector<int> v(5);
	int& a = v.at(0),
		& b = v.at(1),
		& c = v.at(2),
		& d = v.at(3),
		& e = v.at(4);

	while (cin >> a) {
		cin >> ch >> b >> ch >> c >> ch >> d >> ch >> e;

		/*
		one pair  （2 枚の同じ数字のカードが1 組ある）
		two pair  （2 枚の同じ数字のカードが2 組ある）
		three card（3 枚の同じ数字のカードが1 組ある）
		full house（3 枚の同じ数字のカードが1 組と、残りの2 枚が同じ数字のカード）
		four card （4 枚の同じ数字のカードが1 組ある）
		straight  （5 枚のカードの数字が連続している）
		null
		*/

		sort(v.begin(), v.end());
		//cout << a << ' ' << b << ' ' << c << ' ' << d << ' ' << e << endl;

		string t = "null";
		vector<int> v2(4);
		v2.at(0) = b - a;
		v2.at(1) = c - b;
		v2.at(2) = d - c;
		v2.at(3) = e - d;

		int cnt = count(v2.begin(), v2.end(), 0);
		if (cnt == 1) {
			t = "one pair";
		}
		else if (cnt == 2) {
			if (v2.at(0) == 0 && v2.at(1) == 0) {
				t = "three card";
			}
			else if (v2.at(1) == 0 && v2.at(2) == 0) {
				t = "three card";
			}
			else if (v2.at(2) == 0 && v2.at(3) == 0) {
				t = "three card";
			}
			else {
				t = "two pair";
			}
		}
		else if (cnt == 3) {
			if (v2.at(1)!=0||v2.at(2)!=0){
				t = "full house";
			}
			else {
				t = "four card";
			}
		}
		else {
			if (v.at(1) == v.at(0) + 1
				&& v.at(2) == v.at(1) + 1
				&& v.at(3) == v.at(2) + 1) {
				t = "straight";
			}
		}

		if (a == 1 && b == 10 && c == 11 && d == 12 && e == 13) t = "straight";

		cout << t << endl;
	}
}