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 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 <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
typedef pair<int,int> pii;

int main() {
	int c[5];
	char k;
	while(cin >> c[0] >> k >> c[1] >> k >> c[2] >> k >> c[3] >> k >> c[4]) {
		int cnt[13] = {};
		int twoes = 0;
		rep(i,5) {
			cnt[c[i]-1]++;
		}
		rep(i,13) {
			if(cnt[i] == 4) {
				cout << "four card" << endl;
				goto END;
			}
		}
		rep(i,13) {
			rep(j,13) {
				if(cnt[i]==3 && cnt[j]==2) {
					cout << "full house" << endl;
					goto END;
				}
			}
		}
		rep(i,10) {
			bool ok = true;
			rep(j,5) {
				int n = (i+j)%13;
				if(cnt[n] != 1) {
					ok = false;
					break;
				}
			}
			if(ok) {
				cout << "straight" << endl;
				goto END;
			}
		}
		rep(i,13) {
			if(cnt[i] == 3) {
				cout << "three card" << endl;
				goto END;
			}
		}
		rep(i,13) {
			if(cnt[i] == 2) twoes++;
		}
		if(twoes==2) {
			cout << "two pair" << endl;
		} else if(twoes==1) {
			cout << "one pair" << endl;
		}else {
			cout << "null" << endl;
		}
END:;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const string yaku[] = {"null",
		       "one pair",
		       "two pair",
		       "three card",
		       "four card",
		       "straight",
		       "full house"};
int one(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 1)return 1;
    if(T[i] != T[i+1])cnt = 0;
  }
  return -1;
}

int two(int T[]){
  int cnt = 0,f = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 2)return 2;
  }
  return -1;
}

int three(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 2)return 3;
    if(T[i]!=T[i+1])cnt = 0;
  }
  return -1;
}

int four(int T[]){
  int cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 3)return 4;
    if(T[i] != T[i+1])cnt = 0;
  }
  return -1;
}
int straigt(int T[]){
  int f = 1;
  if(T[0] == 1&&T[4] == 13){
    if(T[1] == 10 && T[2] == 11 && T[3] == 12 )f = 1;
    else f = 0;
  }else{
    for(int i = 0 ; i < 5 ; i++ ){
      if(T[i] != i + T[0])f = 0;
    }
  }
  if(f)return 5;
  else return -1;
}

int fullhouse(int T[]){
  int cmp1=-1,cmp2=-1;
  int cnt = 0;
  //3
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 2){
      cmp1 = T[i];
      break;
    }
    if(T[i] != T[i+1])cnt = 0;
  }
  //2
  cnt = 0;
  for(int i = 0 ; i < 4 ; i++){
    if(T[i] == T[i+1])cnt++;
    if(cnt == 1 && T[i+1] != T[i+2]){
      cmp2 = T[i];
      break;
    }
    if(T[i] != T[i+1])cnt = 0;
  }
  if(cmp1 != cmp2 && cmp1 > 0 && cmp2 > 0)return 6;
  else return -1;
}

int main(){
  int toranpu[5];
  char c;
  while(cin >> toranpu[0]){
    int f = 0;
    for(int i = 1; i < 5 ; i++){
      cin >> c >>toranpu[i];
    }
    sort(toranpu,toranpu+5);

    if(one(toranpu) != -1)f = one(toranpu);

    if(two(toranpu) != -1)f = two(toranpu);

    if(three(toranpu) != -1)f = three(toranpu);

    if(four(toranpu) != -1)f = four(toranpu);

    if(straigt(toranpu) != -1)f = straigt(toranpu);

    if(fullhouse(toranpu) != -1)f = fullhouse(toranpu);

    cout << yaku[f] << endl;
  }
  return 0;
}

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

int main() {
	int c[5];
	while (scanf("%d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF) {
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j<4; j++) {
				if (c[j] > c[j + 1]) {
					int tmp = c[j];
					c[j] = c[j + 1];
					c[j + 1] = tmp;
				}
			}
		}
		if ((c[0]==c[1]&&c[1]==c[2]&&c[2]==c[3])||(c[1]==c[2]&&c[2]==c[3]&&c[3]==c[4]))cout << "four card" << endl;
		else if ((c[0]==c[1]&&c[1]==c[2]&&c[3]==c[4])||(c[0]==c[1]&&c[2]==c[3]&&c[3]==c[4]))cout << "full house" << endl;
		else if ((c[0]==1&&c[1]==10&&c[2]==11&&c[3]==12&&c[4]==13)||(c[0]+1==c[1]&&c[0]+2==c[2]&&c[0]+3==c[3]&&c[0]+4==c[4]))cout << "straight" << endl;
		else if ((c[0]==c[1]&&c[1]==c[2])||(c[1]==c[2]&&c[2]==c[3])||(c[2]==c[3]&&c[3]==c[4]))cout << "three card" << endl;
		else if ((c[0]==c[1]&&c[2]==c[3])||(c[1]==c[2]&&c[3]==c[4])||(c[0]==c[1]&&c[3]==c[4]))cout << "two pair" << endl;
		else if ((c[0] == c[1]) || (c[1] == c[2]) || (c[2] == c[3]) || (c[3] == c[4]))cout << "one pair" << endl;
		else cout << "null" << endl;
	}
}