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>

int main (){
	
	int card[6];
	int index;
	int i, j;
	int time=0;
	
	do{
		scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]);
			do{
				for(j=0;j<5;j++){
					for(i=0;i<5-1;i++){
						if(card[i]>card[i+1]){
							index=card[i+1];
							card[i+1]=card[i];
							card[i]=index;
						}
					}
				}
			} while (card[j]>card[j+1]);
		if((card[0]==card[1] && card[1]==card[2] && card[3]==card[4]) || (card[0]==card[1] && card[2]==card[3] && card[3]==card[4])){
			printf("full house\n");}
		else if((card[0]==card[1] && card[1]==card[2] && card[2]==card[3]) || (card[1]==card[2] && card[2]==card[3] && card[3]==card[4])){
			printf("four card\n");}
		else if((card[0]==card[1] && card[1]==card[2]) || (card[1]==card[2] && card[2]==card[3]) || (card[2]==card[3] && card[3]==card[4])){
			printf("three card\n");}
		else if((card[0]==card[1] && card[2]==card[3]) || (card[0]==card[1] && card[3]==card[4]) || (card[1]==card[2] && card[2]==card[3])){
			printf("two pair\n");}
		else if(card[0]==card[1] || card[1]==card[2] || card[2]==card[3] || card[3]==card[4]){
			printf("\none pair\n");}
		else if((card[0]==card[1]-1 && card[1]==card[2]-1 && card[2]==card[3]-1 && card[3]==card[4]-1) || 
				(card[0]==1 && card[1]==card[2]-1 && card[2]==card[3]-1 && card[3]==card[4]-1)){
			printf("stright\n");}
		else printf("null\n");
		time++;
	} while (time<50);
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
using namespace std;
string s[]={"one pair","two pair","three card","straight","null"};

int str(int n){
	cout << s[n] << endl;
	return 0;
}

int main(){
	int a[5], t[13], ans, m;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		ans = -1, m = 0;
		sort(a, a+5);
		for(int i = 0;i < 13;i++){
			t[i] = count(a, a+5,i+1);
			if(m < t[i])m = t[i];
		}
		
		int flag = 0;
		if(a[0]==1&&a[1]==10&&a[2]==11&&a[3]==12&&a[4]==13){str(3);continue;}
		for(int i = 1;i < 5 && a[i-1]+1 == a[i];i++)flag = i;
		if(flag == 4){str(3);continue;}
		
		if(m == 4){cout << "four card" << endl;continue;}
		if(m == 3){
			int f = 1;
			for(int i = 0;i < 13;i++){
				if(t[i] == 2)f = 0;
			}
			if(!f){cout << "full house" << endl;continue;}
			ans = 2;
		}
		
		for(int i = 0;i < 13;i++){
			if(!ans && t[i] == 2)ans = 1;
			if(ans != 1 && t[i] == 2)ans = 0;
		}
		if(ans == -1)ans = 4;
		str(ans);
	}
	return 0;
}

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

int main(){
	int n[5], num[14], pair[3],i;
	while (scanf_s("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
		i = 0;
		for (int i = 0; i < 14; i++) num[i] = 0;
		for (int i = 0; i < 3; i++) pair[i] = 0;
		for (int i = 0; i < 5; i++) num[n[i] - 1]++;
		for (int i = 0; i < 13; i++){
			if (num[i] > 1) pair[num[i] - 2]++;
		}
		if (pair[2]) cout << "four card" << endl;
		else if (pair[0] && pair[1]) cout << "full house" << endl;
		else if (pair[1]) cout << "three card" << endl;
		else if (pair[0] == 2) cout << "two pair" << endl;
		else if (pair[0]) cout << "one pair" << endl;
		else{
			num[13] = num[0];
			for (i = 0; i < 10; i++){
				if (num[i] == 1 && num[i] == num[i + 1] && num[i + 1] == num[i + 2] && num[i + 2] == num[i + 3] && num[i + 3] == num[i + 4]) {
					cout << "straight" << endl;
					break;
				}
			}
		}
		if (i == 10)  cout << "null" << endl;
	}
	return 0;
}

C++: #include <algorithm>
#include <deque>
#include <iostream>

using namespace std;

int main() {

	int a, ans;
	deque<int> h;

	while(1) {
		for(int i=0; i<5; i++) {
			cin >> a;
			h.push_back(a);
		}
		sort(h.begin(), h.end());
		while(1) {
			if(h[0]==h[1]) {
				if(h[1]==h[2]) {
					if(h[2]==h[3]) {
						ans=7;
						break;
					}
					if(h[3]==h[4]) {
						ans=6;
						break;
					}
					ans=4;
					break;
				}
				if(h[2]==h[3]&&h[3]==h[4]) {
					ans=6;
					break;
				}
				if(h[2]==h[3]||h[3]==h[4]||h[4]==h[2]) {
					ans=3;
					break;
				}
				ans=2;
				break;
			}
			if(h[1]==h[2]&&h[2]==h[3]&&h[3]==h[4]) {
				ans=7;
				break;
			}
			if(h[4]==h[3]+1&&h[3]==h[2]+1&&h[2]==h[1]+1&&h[1]==h[0]+1) {
				ans=5;
				break;
			}
			if(h[0]==1&&h[4]==h[3]+1&&h[3]==h[2]+1&&h[2]==h[1]+1) {
				ans=5;
				break;
			}
			if(h[1]==h[2]&&h[2]==h[3]||h[2]==h[3]&&h[3]==h[4]) {
				ans=4;
				break;
			}
			if(h[2]==h[3]&&h[4]==h[5]) {
				ans=3;
				break;
			}
			if(h[1]==h[2]||h[1]==h[3]||h[1]==h[4]||h[2]==h[3]||h[2]==h[4]||h[3]==h[4]) {
				ans=2;
				break;
			}
			ans=1;
			break;
		}
		h.clear();
		switch(ans) {
			case 1:
				cout << "null" << endl;
				break;
			case 2:
				cout << "one pair" << endl;
				break;
			case 3:
				cout << "two pair" << endl;
				break;
			case 4:
				cout << "three cards" << endl;
				break;
			case 5:
				cout << "straight" << endl;
				break;
			case 6:
				cout << "full house" << endl;
				break;
			case 7:
				cout << "four cards" << endl;
				break;
		}
	}

	return 0;

}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <functional>
using namespace std;

int main() {
  int a[5];
  int b[5];
  bool s;
  int x, y;
  while (scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]) == 5) {
    sort(a, a+5);
    memset(b, 0, sizeof(int)*5);
    x = y = -1;
    for (int i=0; i<5; i++) {
      if (a[i] != x) {
        x = a[i];
        ++y;
      }
      ++b[y];
    }
    sort(b, b+5, greater<int>());
    s = true;
    for (int i=0; i<4; i++) {
      if (a[i]+1 != a[i+1]) {
        s = false;
        break;
      }
    }
    if (a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13) s = true;  // exception
    if (b[0] == 4) {
      printf("four card\n");
    } else if (b[0] == 3 && b[1] == 2) {
      printf("full house\n");
    } else if (s) {
      printf("straight\n");
    } else if (b[0] == 3) {
      printf("three card\n");
    } else if (b[0] == 2 && b[1] == 2) {
      printf("two pair\n");
    } else if (b[0] == 2) {
      printf("one pair\n");
    } else {
      printf("null\n");
    }
  }

  return 0;
}