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

int main(){
	int hand[5];
	int card[13];
	int m;
	while(scanf("%d,%d,%d,%d,%d", &hand[0], &hand[1], &hand[2], &hand[3], &hand[4]) != EOF){
		m = -99999;
		for(int i = 0; i < 13; i++){
			card[i] = 0;
		}
		for(int i = 0; i < 5; i++){
			card[hand[i]]++;
		}
		sort(hand, hand+5);
		for(int i = 0; i < 13; i++){
			m = max(m, card[i]);
		}
		if(m == 4){
			printf("four card\n");
		}else if(m == 3){
			if((hand[0] == hand[1] && hand[0] == hand[2] && hand[3] == hand[4])
				||(hand[0] == hand[1] && hand[2] == hand[3] && hand[2] == hand[4])){
				printf("full house\n");
			}else {
				printf("three card\n");
			}
		}else if(m == 2){
			if(hand[0] == hand[1] && (hand[2] == hand[3] || hand[3] == hand[4])
					|| hand[1] == hand[2] && hand[3] == hand[4]){
				printf("two pair\n");
			}else if(hand[0] == hand[1] || hand[1] == hand[2] || hand[2] == hand[3] || hand[4]){
				printf("one pair\n");
			}
		}else if(hand[0]+1 == hand[1] && hand[1]+1 == hand[2] && hand[2]+1 == hand[3] && hand[3]+1 == hand[4]
				|| hand[0] == 1 && hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13){
			printf("straight\n");
		}else{
			printf("null\n");
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

using namespace std;
int main(void)
{
  for(;;){
    int n[5];
    char c;
    REP(i,5){
      if(i) cin >> c;
      if((scanf("%d",&n[i])) == 0) return 0;
    }
    int num[16];
    REP(i,16) num[i]=0;
    REP(i,5) ++num[n[i]];
    num[14]=num[1];
    string s="null";
    REP(i,11){
      int st=0;
      REP(j,5) if(num[i+j]) ++st;
      if(st==5) s="straight";
    }
    int pa=0;
    REP(i,5) REP(j,i) if(n[i]==n[j]) ++pa;
    if(pa==1) s="one pair";
    if(pa==2) s="two pair";
    if(pa==3) s="three card";
    if(pa==4) s="full house";
    if(pa==6) s="four card";
    cout << s << 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()
{
	string card;

	while(cin >> card)
	{
		string Ncard;

		for(int i = 0; i < card.size(); i++)
		{
			if(card[i] != ',')
			{
				Ncard += card[i];
			}
		}
		card = Ncard;

		sort(card.begin(), card.end());

		bool straight = true;

		
		char st = card[0] + 1;
		for(int i = 1; i < 5; i++)
		{
			if(card[i] == st)
			{
				st++;
			}
			else
			{
				straight = false;
				break;
			}
		}
		if(straight)
		{	
			cout << "straight" << endl;
			continue;
		}

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

		card = Ncard;

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

		else if(card.size() == 8)
		{
			cout << "one pair" << endl;
		}
		else
		{
			cout << "null" << endl;
		}
	}
}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <algorithm>

using namespace std;

int x[5];



int main () {
    while(scanf("%d,%d,%d,%d,%d",&x[0],&x[1],&x[2],&x[3],&x[4])!=EOF){
        int bucket[15]={0};
        for(int i=0; i<5; i++){
            if(x[i]==1){
                bucket[14]++;
            }
            bucket[x[i]]++;
        }
        
        int max1=0;
        int max2=0;
        for(int i=0; i<14; i++){
            if(max1<bucket[i]){
                max2=max1;
                max1=bucket[i];
            }else if(max2<bucket[i]){
                max2=bucket[i];
            }
        }
        
        int first=-1;
        for(int i=0; i<15; i++){
            if(bucket[i]==1){
                first=i;
                break;
            }
        }
        

        
        int straight=1;
        for(int i=first; i<first+4; i++){
            if(bucket[i]!=1){
                straight=0;
                break;
            }
        }
        
        if(straight!=1){
            straight=1;
            for(int i=10; i<15; i++){
                if(bucket[i]!=1){
                    straight=0;
                    break;
                }
            }
        }
        
        
        if(max1==4){
            cout<<"four card"<<endl;
        }else if(max1==3&&max2==2){
            cout<<"full house"<<endl;
        }else if(straight==1){
            cout<<"straight"<<endl;
        }else if(max1==3){
            cout<<"three card"<<endl;
        }else if(max1==2&&max2==2){
            cout<<"two pair"<<endl;
        }else if(max1==2){
            cout<<"one pair"<<endl;
        }else{
            cout<<"null"<<endl;
        }




    }
    
    return 0;
}