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<cstdio>
#define REP(i,n) for(int i=0;i<(int)(n);i++)

void hoge(int* a){
  int cards[13]{0};
  REP(i,5) cards[a[i]-1]++;
  REP(i,13){
    if(cards[i]==4){
      puts("four card");
      return;
    }
  }
  REP(i,13){
    if(cards[i]==3){
      REP(j,13){
	if(cards[j]==2){
	  puts("full house");
	  return;
	}
      }
      puts("three card");
      return;
    }
  }
  REP(i,13){
    if(cards[i]==2){
      for(int j=i+1;j<=13;j++){
	if(cards[j]==2){
	  puts("two pair");
	  return;
	}
      }
      puts("one pair");
      return;
    }
  }
  REP(i,13){
    if(cards[i]==1){
      if(cards[i+1]==1&&
	 cards[i+2]==1&&
	 cards[i+3]==1&&
	 cards[i+4]==1){
	puts("straight");
	return;
      }
    }
  }
  if(cards[0]==1&&
     cards[9]==1&&
     cards[10]==1&&
     cards[11]==1&&
     cards[12]==1){
    puts("straight");
    return;
  }
  puts("null");
  return;
}

int main(){
  int a[5];
  while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])>0){
    hoge(a);
  }
}

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

int check(vector<int> v) {
	sort(v.begin(), v.end());
	//for (int i = 0; i < v.size(); i++)cout << v[i] << "  ";
	if ((v[0] == v[1] && v[1] == v[2] && v[2]== v[3]) || (v[1] == v[2] && v[2]== v[3] && v[3] == v[4])) {//four cards
		return 1;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) && (v[3] == v[4])) || ((v[0] == v[1]) && (v[2] == v[3] && v[3] == v[4]))) {//full house
		return 2;
	}
	else if (v[0] == v[1] - 1 && v[0] == v[2] - 2 && v[0] == v[3] - 3 && v[0] == v[4] - 4) {//straight
		return 3;
	}
	else if (v[0]==1 && v[1]==10 && v[2]==11 && v[3] == 12 && v[4] == 13) {//straight
		return 3;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) || (v[1] == v[2] && v[2] == v[3])) || ((v[2] == v[3] && v[3] == v[4]))) {//three cards
		return 4;
	}
	else if ((v[0] == v[1] && v[2] == v[3]) || (v[0] == v[1] && v[3] == v[4]) || (v[1] == v[2] && v[3] == v[4])) {//two pair
		return 5;
	}
	else if ((v[0] == v[1]) || (v[1] == v[2]) || (v[2] == v[3]) || (v[3] == v[4])) {//one pair
		return 6;
	}
	else {
		return 7;
	}
}


int main()
{
	vector<int> v;
	int a, b, c, d, e;
	while (scanf("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF) {
		v.clear();
		v.push_back(a);
		v.push_back(b);
		v.push_back(c);
		v.push_back(d);
		v.push_back(e);
		switch (check(v)) {
			case 1:cout << "four cards" << endl; break;
			case 2:cout << "full house" << endl; break;
			case 3:cout << "straight" << endl; break;
			case 4:cout << "three card" << endl; break;
			case 5:cout << "two pair" << endl; break;
			case 6:cout << "one pair" << endl; break;
			case 7:cout << "null" << endl; break;
			default:cout << "Error" << endl; break;
		}
	}
    return 0;
}

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

string pairs[2][3] = { {"null","one pair","two pair"},
					  {"three card","full house",""} };

int main() {
	int n[5], c, three, two;
	char t;
	string res;
	while (scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF) {
		int card[13] = { 0 }, c = 0, three = 0, two = 0;
		for (int i = 0; i < 5; i++) {
			card[n[i]]++;
		}

		for (int i = 0; i < 13; i++) {
			if (card[i] == 4) {
				c = 114514;
				break;
			} else if(card[i] == 3) {
				three++;
			} else if(card[i] == 2) {
				two++;
			}

			if (card[i] == 1) {
				c++;

				if (c == 4 && i == 12 && card[0] == 1) {
					c = 5;
					break;
				}
			} else if(card[i] == 0 && c != 5 && c > 0) {
				c = 0;
			}
		}
		if (c == 5) {
			cout << "straight" << endl;
		} else if (c == 114514) {
			cout << "four card" << endl;
		} else {
			cout << pairs[three][two] << endl;
		}
	}

	return 0;
}

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

using namespace std;

bool fourcard(int h[5]) {
	if ((h[0] == h[1] && h[0] == h[2] && h[0] == h[3]) ||
		(h[4] == h[1] && h[4] == h[2] && h[4] == h[3]) )
		return true;
	return false;
}

bool fullhouse(int h[5]) {
	if ((h[0] == h[1] && h[0] == h[2] && h[3] == h[4]) ||
		(h[0] == h[1] && h[4] == h[2] && h[4] == h[3]) )
		return true;
	return false;
}

bool straight(int h[5]) {
	if (h[0] == 1 && h[1] != 2) {
		for (int i = 1; i < 5; i++)
			if (h[i] != i + 9)
				return false;
	}
	else {
		for (int i = 0; i < 4; i++)
			if (h[i] + 1 != h[i+1])
				return false;
	}
	return true;
}

bool threecard(int h[5]) {
	for (int i = 0; i < 3; i++)
		if (h[i] == h[i+1] && h[i] == h[i+2])
			return true;
	return false;
}

int pairs(int h[5]) {
	int ret = 0;
	for (int i = 0; i < 4; i++)
		if (h[i] == h[i+1]) {
			ret++;
			i++;
		}
	return ret;
}

int main() {
	int h[5];
	while (scanf("%d,%d,%d,%d,%d", &h[0], &h[1], &h[2], &h[3], &h[4]) != EOF) {
		sort(h, h + 5);
//		for (int i = 0; i < 5; i++)
//			printf("%d ", h[i]);
//		printf("\n");
		if (fourcard(h)) printf("four card\n");
		else if (fullhouse(h)) printf("full house\n");
		else if (straight(h)) printf("straight\n");
		else if (threecard(h)) printf("three card\n");
		else {
			int n = pairs(h);
			switch (n) {
				case 1: printf("one pair\n"); break;
				case 2: printf("two pair\n"); break;
				default: printf("null\n"); break;
			}
		}
	}
	return 0;
}