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

int main()
{
	int x;
	
	while(scanf("%d",&x)!=EOF)
	{
		int a[14]={};
		a[x]++;
		for(int i=0;i<4;i++)
		{
			scanf(",%d",&x);
			a[x]++;
		}
		int c=0,z=0;
		for(int i=1;i<=13;i++)c=max(c,a[i]);
		for(int i=1;i<=13;i++)if(c==a[i])z++;
		if(c==2&&z==1)
		{
			cout<<"one pair"<<endl;
		}
		else if(c==2&&z==2)
		{
			cout<<"two pair"<<endl;
		}
		else if(c==3)
		{
			for(int i=1;i<=13;i++)
			{
				if(a[i]==2)
				{
					cout<<"full house"<<endl;
					break;
				}
				if(i==13)
				{
					cout<<"three card"<<endl;
				}
			}
		}
		else if(c==4)
		{
			cout<<"four card"<<endl;
		}
		else
		{
			bool e=false;
			for(int i=1;i<=10;i++)
			{
				bool hoge=true;
				for(int l=0;l<5;l++)
				{
					int g=i+l;
					if(g>13)
					{
						g-=13;
					}
					if(a[g]==0)hoge=false;
				}
				if(hoge==true)e=true;
			}
			if(e)cout<<"straight"<<endl;
			else cout<<"null"<<endl;
			
		}
	}
}

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

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

    int data1[5];
    int kumi = 0;
    int before = 0;
    int count = 1;
    for(int i = 0; i < 5; i++) {
      if(card[i] != before) {
	data1[kumi++] = count;
	count = 1;
      } else {
	count++;
      }
      before = card[i];
    }

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

      if(flag) {
	cout << "straight" << endl;
      } else {
	cout << "null" << endl;
      }
    }
  }
  return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    int cs[5];
    while(scanf("%d,%d,%d,%d,%d",&cs[0],&cs[1],&cs[2],&cs[3],&cs[4])!=-1){
        sort(cs,cs+5);
        if((cs[0]==cs[1] && cs[1]==cs[2] && cs[2]==cs[3]) || (cs[1]==cs[2] && cs[2]==cs[3] && cs[3]==cs[4])) printf("four card\n");
        else if((cs[0]==cs[1] && cs[2]==cs[3] && cs[3]==cs[4]) || (cs[0]==cs[1] && cs[1]==cs[2] && cs[3]==cs[4])) printf("full house\n");
        else if(cs[0]==1 && cs[1]==10 && cs[2]==11 && cs[3]==12 && cs[4]==13) printf("straight\n");
        else if(cs[0]==cs[1]-1 && cs[1]==cs[2]-1 && cs[2]==cs[3]-1 && cs[3]==cs[4]-1) printf("straight\n");
        else if((cs[0]==cs[1] && cs[1]==cs[2]) || (cs[1]==cs[2] && cs[2]==cs[3]) || (cs[2]==cs[3] &&cs[3]==cs[4])) printf("three card\n");
        else{
            int ps=0;
            if(cs[0]==cs[1]) ps++;
            if(cs[1]==cs[2]) ps++;
            if(cs[2]==cs[3]) ps++;
            if(cs[3]==cs[4]) ps++;
            if(ps==2) printf("two pair\n");
            else if(ps==1) printf("one pair\n");
            else printf("null\n");
        }
    }
}

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;

struct cards{
	int num, card;
};

bool straight( vector<int> card )
{
	sort(card.begin(), card.end());
	int st = card[0];
	bool straight1 = true, straight2 = true;
	for(int i = 1; i < 5; i++)
	{
		st++;
		if(st != card[i])
		{
			straight1 = false;
			break;
		}
	}

	for(int i = 0; i < 5; i++)
	{
		if(card[i] == 1) card[i] = 14;
	}

	sort(card.begin(), card.end());
	st = card[0];
	for(int i = 1; i < 5; i++)
	{
		st++;
		if(st != card[i])
		{
			straight2 = false;
			break;
		}
	}

	return (straight1 || straight2);
}

int main()
{
	vector<int> card(5);
	vector<int> num;
	// num, card
	while(scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF)
	{
		num.clear();

		if(straight(card))
		{
			cout << "straight" << endl;
			continue;
		}

		int cnt = 1;
		for(int i = 0; i < 5; i++)
		{
			if(card[i] == card[i+1])
			{
				cnt++;
			}
			else
			{
				num.push_back(cnt);

				cnt = 1;
			}
		}

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

			else if( num[0] == 2 && num[1] == 2 || num[0] == 2 && num[2] == 2 || num[1] == 2 && num[2] == 2)
			{
				cout << "two pair" << endl;
			}
		}
		else if(num.size() == 4)
		{
			cout << "one pair" << endl;
		}
		else if(num.size() == 5)
		{
			cout << "null" << endl;
		}
	}
}