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<vector>
#include<algorithm>
#include<cstdio>
#include<map>
using namespace std;
int main(){
  for(;;){
    vector<int> lot(5);
    int ans = 0;
    if(scanf("%d",&lot[0]) == EOF) break;
    for(int i=1; i<5; i++) scanf(",%d",&lot[i]);
    sort(lot.begin(),lot.end());
    map<int,int> card;
    for(int i=0; i<5; i++) card[lot[i]]++;
    for(map<int,int>::iterator it = card.begin(); it!=card.end(); it++){
      if(it->second == 2) ans+=2; 
      if(it->second == 3) ans+=3;
      if(it->second == 4) ans+=6;
    }
    if(ans == 2) cout <<"one pair"<<endl;
    if(ans == 3) cout <<"three card"<<endl;
    if(ans == 4) cout <<"two pair"<<endl;
    if(ans == 5) cout <<"full house"<<endl;
    if(ans == 6) cout <<"four card"<<endl;
    if(lot[0]+1 == lot[1] && lot[1]+1 == lot[2] && lot[2]+1 == lot[3] && lot[3]+1 == lot[4]) cout <<"straight"<<endl;
    else if(lot[0] == 1 && lot[1] == 10 && lot[2] == 11 && lot[3] == 12 && lot[4] == 13) cout <<"straight"<<endl;
    else if(ans == 0) cout<<"null"<<endl;
  }
  return 0;
}

C++: #include <string>
#include <iostream>
#include <map>
#include <cstdio>

using namespace std;

int main(){
	int hand[5];

	while(~scanf("%d", &hand[0])){
		for(int i = 1; i < 5; i++){
			scanf(",%d", &hand[i]);
		}
		int num[17] = {0};

		for(int i = 0; i < 5; i ++){
			if(hand[i] == 1){
				hand[i] += 13;
			}
			num[hand[i]]++;
		}

		int h = 0;
		string s[] = {
			"null",
			"one pair",
			"two pair",
			"three card",
			"straight",
			"full house",
			"four card",
		};
		int seq = 0;

		for(int i = 2; i < 17; i++){
			if(num[i] == 2){
				if(h == 3){
					h = 5;
				}else{
					h++;
				}
			}
			else if(num[i] == 3){
				if(h == 1){
					h = 5;
				}else{
					h = 3;
				}
			}
			else if(num[i] == 4){
				h = 6;
			}
			else if(num[i-2]&num[i-1]&num[i]&num[i+1]&num[i+2]){
				h = 4;
			}
		}

		cout << s[h] << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[5];
	char c;
	while(cin >> a[0]){
		int card[13] = {0};
		for(int i = 1; i < 5; i++) cin >> c >> a[i];
		for(int i = 0; i < 5; i++) card[a[i]-1]++;
		int pair = 0, cards = 0, straight = 1;
		for(int i = 0; i < 13; i++){
			if(card[i] == 2) pair ++;
			cards = max(cards, card[i]);
		}
		sort(a, a+5);
		for(int i = 1; i < 5; i++) if(a[i]-a[i-1] != 1) straight = 0;
		if(a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13) straight = 1;

		if(cards == 4) cout << "four card" << endl;
		else if(cards == 3 && (a[0]==a[1] || a[3]==a[4])) cout << "full house" << endl;
		else if(straight) cout << "straight" << endl;
		else if(cards == 3) cout << "three card" << endl;
		else if(pair == 2) cout << "two pair" << endl;
		else if(pair) cout << "one pair" << endl;
		else cout << "null" << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <iostream>
 
using namespace std;
 
int main() {
 
    int a[5];
    int kari;
    char d;
     
    while (cin >> a[0] >> d >> a[1] >> d >> a[2] >> d >> a[3] >> d >> a[4]) {
        for (int i = 4; i > 0; i--) {
            for (int j = 0; j < i; j++) {
                if (a[j] > a[j+1]) {
                    kari = a[j];
                    a[j] = a[j+1];
                    a[j+1] = kari;
                }
            }
        }
        if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3] || a[3] == a[4]) {
            if ((a[0] == a[1] && a[1] == a[2]) || (a[1] == a[2] && a[2] == a[3]) || (a[2] == a[3] && a[3] == a[4])) {
                if (((a[0] == a[1] && a[1] == a[2]) && (a[3] == a[4])) || ((a[0] == a[1]) && (a[2] == a[3] && a[3] == a[4]))) {
                    cout << "full house" << endl;
                } else if ((a[0] == a[1] && a[1] == a[2] && a[2] == a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])){
                    cout << "four card" << endl;
                }else {
                    cout << "three card" << endl;
                }
            } else if ((a[0] == a[1] && a[2] == a[3]) || (a[0] == a[1] && a[3] == a[4]) || (a[1] == a[2] && a[3] == a[4])) {
                if ((a[0] == a[1] && a[1] == a[2] && a[2] == a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])) {
                    cout << "four card" << endl;
                } else {
                    cout << "two pair" << endl;
                }
            } else {
                cout << "one pair" << endl;
            }
        } else if ((a[1] == a[0] + 1 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1) || (a[0]  == 1 && a[1] == 10 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1)){
            cout << "straight" << endl;
        } else {
            cout << "null" << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

char roll[8][11] = {"null","null","one pair","two pair","three card","straight","full house","four card"};

int main(){
	int ans;
	int emp;
	int a[5];
	int hand[15];
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4]) != EOF){
		for(int i = 0; i < 15; i++){
			hand[i] = 0;
		}
		for(int i = 0; i < 5; i++){
			hand[a[i]]++;
		}
		emp = 0;
		for(int i = 0; i < 14; i++){
			if(hand[i]){
				emp++;
			}
		}
		hand[14] = hand[1];
		ans = 1;
		if(emp == 4){
			ans = 2;
		}
		if(emp == 3){
			ans = 3;
		}
		for(int i = 1; i < 14; i++){
			if(hand[i] == 3){
				ans = 4;
			}
		}
		for(int i = 1; i < 11; i++){
			if(hand[i] == 1 && hand[i + 1] == 1 && hand[i + 2] == 1 && hand[i + 3] == 1 && hand[i + 4] == 1){
				ans = 5;
			}
		}
		if(emp == 2){
			ans = 6;
		}
		for(int i = 1; i < 14; i++){
			if(hand[i] >= 4){
				ans = 7;
			}
		}
		printf("%s\n",roll[ans]);
	}
	return 0;
}