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 <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

string judge(int* nums){
	set<int> st;
	map<int,int> count;

	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	foreach(it,count){

	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}

int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}

C++: #include<iostream>
#include<string>
#include<stdio.h>
using namespace std;

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}
	
	for(int i=0;i<13;++i){

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5||(num_card[0]&&num_card[12]&&num_card[11]&&num_card[10]&&num_card[9]))
		return 5;
	return 1;
}

int main(){

	string res;
	int c[5];

	while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])+1){
		
		
		switch( Result(c) ){
			case 1:res="null";break;
			case 2:res="one pair";break;
			case 3:res="two pair";break;
			case 4:res="three card";break;
			case 5:res="straight";break;
			case 6:res="full house";break;
			case 7:res="four card";break;
		}

		cout << res << endl;

	}

	return 0;
}

C++: #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])) {
		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;
}

C++: import sys

def is_onepair(x):
    for i in range(4):
        if x.count(x[i]) == 2:
            return True

    return False

def is_twopair(x):
    count = 0
    for e in x:
        for e2 in x:
            if e == e2:
                count += 1
            if count == 2:
                return True

    return False

def is_threecard(x):
    for i in range(3):
        if x.count(x[i]) == 3:
            return True

    return False

def is_straight(x):
    x.sort()
    if x[0] == 1 and x[1:] = [10, 11, 12, 13]:
        return True
    for i in range(4):
        if x[i]+1 != x[i+1]:
            return False
    
    return True

def is_fullhouse(x):
    if is_threecard(x) and is_onepair(x):
        return True

    return False
    
def is_fourcard(x):
    for i in range(2):
        if x.count(x[i]) == 4:
            return True

    return False

for line in sys.stdin.readlines():
    hand = list(map(int, line.split(',')))
    if is_fourcard(hand):
        print("four card")
    elif is_fullhouse(hand):
        print("full house")
    elif is_straight(hand):
        print("straight")
    elif is_threecard(hand):
        print("three card")
    elif is_twopair(hand):
        print("two pair")
    elif is_onepair(hand):
        print("one pair")
    else:
        print("null")

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

bool isstraight(int c[]);

int main(){
    int card[5];

    while(scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4])){
        sort(card, card+5);
        int n = 0;
        for(int i=0; i<4; i++){
            for(int j=i+1; j<5; j++){
                if(card[i] == card[j]){
                    n++;
                }
            }
        }

        switch(n){
            case 1:
                cout << "one pair" << endl;
                break;
            case 2:
                cout << "two pair" << endl;
                break;
            case 3:
                cout << "three card" << endl;
                break;
            case 4:
                cout << "full house" << endl;
                break;
            case 6:
                cout << "four card" << endl;
                break;
            case 10:
                cout << "four card" << endl;
                break;
            default:
                if(isstraight(card)){
                    cout << "straight" << endl;
                }else{
                    cout << "null" << endl;
                }
                break;
        }
    }

    return 0;
}

bool isstraight(int c[]){
    for(int i=1; i<9; i++){
        if(c[0]==i && c[1]==i+1 && c[2]==i+2 && c[3]==i+3 && c[4]==i+4){
            return true;
        }
        if(c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13){
            return true;
        }
    }
    return false;
}