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 <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[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 cards" << 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 <cstdio>

using namespace std;

int main()
{
	int hand;
	
	while (scanf("%d", &hand) != EOF){
		int card[15] = {0};
		card[hand]++;
	
		for (int i = 0; i < 4; i++){
			scanf(",%d",&hand);
			card[hand]++;
		}
		
		int cnt = 0;
		int cast = 1;
	
		if (card[10] == 1 && card[11] == 1 &&card[12] == 1 &&card[13] == 1 &&card[1] == 1){
			cast = 5;
		}
		else {
		for (int i = 1; i <= 14; i++){
			
			if (cnt == 5) cast = 5;
			
			if (card[i] == 1) cnt++;
			else cnt = 0;
		
			if (card[i] == 4) cast = 7;
		
			else if (card[i] == 3){
				for (int j = 1; j < 14; j++){
					if (card[j] == 2){
						cast = 6;
					}
				}
				if (cast == 6);
				else cast = 4;
			}
		
			else if (card[i] == 2){
				for (int j = 1; j < 14; j++){
					if (card[j] == 3){
						cast = 6;
					}
				}
				if (cast == 6);
				else if (cast == 2) cast = 3;
				else cast = 2;
			}
		}
		}
		if (cast == 7) printf("four card\n");
		else if (cast == 6) printf("full house\n");
		else if (cast == 5) printf("straight\n");
		else if (cast == 4) printf("three card\n");
		else if (cast == 3) printf("two pair\n");
		else if (cast == 2) printf("one pair\n");
		else if (cast == 1) printf("null\n");
	}
	
	return (0);
}

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> c(5);
  while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4]) != EOF){
    int ans = 0;
    sort(c.begin(),c.end());
    for(int i=0; i<5; i++){
      if(i<2){
	if(c[i] == c[i+1] && c[i+1] == c[i+2] && c[i+2] == c[i+3]){
	  ans+=6;
	  i+=3;
	}
      }
      if(i<3){
	if(c[i] == c[i+1] && c[i+1] == c[i+2]){
	  ans+=3;
	  i+=2;
	}
      }
      if(i<4){
	if(c[i] == c[i+1]){
	  ans+=2;
	  i++;
	}
      }
    }
    if(ans == 6) cout <<"four card"<<endl;
    else if(ans == 5) cout <<"full house"<<endl;
    else if(ans == 4) cout <<"two pair"<<endl;
    else if(ans == 3) cout <<"three card"<<endl;
    else if(ans == 2) cout <<"one pair"<<endl;
    else if(c[0]+1 == c[1] && c[1]+1 == c[2] && c[2]+1 == c[3] && c[3]+1 == c[4]) cout <<"straight"<<endl;
    else if(c[0] == 1 && c[1] == 2 && c[2] == 11 && c[3] == 12 && c[4] == 13) cout <<"straight"<<endl;
    else cout <<"null"<<endl;
  }
  return 0;
}

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

int main(void) {
    int a[5];
    char c;
    while (cin >> a[0] >> c >> a[1] >> c >> a[2] >> c >> a[3] >> c >> a[4]) {
        int b[13] = {};
        for (int i = 0; i < 5; ++i) ++b[a[i]];
        sort(a, a+5);
        sort(b, b+13, greater<int>());


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

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
using namespace std;

int c[5];// card

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

int main(void)
{
    while(~scanf("%d,%d,%d,%d,%d", c, c+1, c+2, c+3, c+4)) {
        sort(c, c+5);
        if(c[0] == c[3] || c[1] == c[4]) {
            puts("four card");
        } else if((c[0] == c[2] && c[3] == c[4]) ||
                (c[0] == c[1] && c[2] == c[4])) {
            puts("full house");
        } else if(straight()) {
            puts("straight");
        } else if(c[0]==c[2] || c[1]==c[3] || c[2]==c[4]) {
            puts("three card");
        } else if((c[0]==c[1] && (c[2]==c[3] || c[3]==c[4])) ||
                (c[1]==c[2] && c[3]==c[4])) {
            puts("two pair");
        } else if(c[0]==c[1] || c[1]==c[2] || c[2]==c[3] || c[3]==c[4]) {
            puts("one pair");
        } else {
            puts("null");
        }   
    }


    return 0;
}