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 <algorithm>
#include <iostream>

using namespace std;

int straight(int[]);

int main() {

	int ans, h[5];

	while(1) {
		ans=0;
		for(int i=0; i<5; i++) {
			cin >> h[i];
		}
		if(cin.eof())
			break;
		sort(h, h+5);
		for(int i=0; i<4; i++) {
			for(int j=i+1; j<5; j++) {
				if(h[i]==h[j])
					ans++;
			}
		}
		switch(ans) {
			case 1:
				cout << "one pair" << endl;
				break;
			case 2:
				cout << "two pair" << endl;
				break;
			case 3:
				cout << "three cards" << endl;
				break;
			case 5:
				cout << "straight" << endl;
				break;
			case 4:
				cout << "full house" << endl;
				break;
			case 6:
				cout << "four cards" << endl;
				break;
			case 10:
				cout << "four cards" << endl;
				break;
			default:
				if(straight(h))
					cout << "straight" << endl;
				else
					cout << "null" << endl;
		}
	}
	
	return 0;

}

int straight(int h[5]) {

	for(int i=0; i<9; i++) {
		if(h[4]=i+4&&h[3]==i+3&&h[2]==i+2&&h[1]==i+1&&h[0]==i||h[0]==1&&h[1]==10&&h[2]==11&&h[3]==12&&h[4]==13)
			return 1;
	}

	return 0;

}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
  int hand[5];
  while(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4])!=EOF){
    int c[13] = {0};
    int v[5] = {0};
    bool f = true;
    sort(hand,hand+5);
    for(int i = 0; i < 5; i++){
      if(hand[0] != hand[i] - i){
	f = false;
      }
      c[hand[i] - 1]++;
    }
    if(c[0] && c[9] && c[10] && c[11] && c[12]){
      f = true;
    }
    for(int i = 0; i < 13; i++){
      v[c[i]]++;
    }

    if(v[4]) puts("four card");
    else if(v[3] && v[2]) puts("full house");
    else if(f) puts("straight");
    else if(v[3]) puts("three card");
    else if(v[2] == 2) puts("two pair");
    else if(v[2]) puts("one pair");
    else puts("null");
  }
}

C++: //Poker Hand
#include<bits/stdc++.h>
using namespace std;

int c[5];

bool four_card(){
  if(c[0]==c[3] || c[1]==c[4]){
    cout<<"four card"<<endl;
    return true;
  }
  return false;
}

bool full_house(){
  if((c[0]==c[2] && c[3]==c[4]) || (c[0]==c[1] && c[2]==c[4])){
    cout<<"full house"<<endl;
    return true;
  }
  return false;
}

bool straight(){
  int i, n=c[0];
  for(i=1; i<5; i++){
    if(n==1&&c[i]==10){
      n=c[1];
      continue;
    }
    if(c[i]!=n+1)break;
    n=c[i];
  }
  if(i==5){
    cout<<"straight"<<endl;
    return true;
  }
  return false;
}

bool three_card(){
  if(c[0]==c[2] || c[1]==c[3] || c[2]==c[4]){
    cout<<"three card"<<endl;
    return true;
  }
  return false;
}

bool two_pair(){
  int n=0;
  for(int i=0; i<5; i++){
    if(c[i]==c[i+1])n++;
  }
  if(n==2){
    cout<<"two pair"<<endl;
    return true;
  }
  return false;
}

bool one_pair(){
  int n=0;
  for(int i=0; i<5; i++){
    if(c[i]==c[i+1])n++;
  }
  if(n==1){
    cout<<"one pair"<<endl;
    return true;
  }
  return false;
}

int main(){
  while(scanf("%d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4])!=EOF){
    sort(c, c+5);
    if(four_card())continue;
    if(full_house())continue;
    if(straight())continue;
    if(three_card())continue;
    if(two_pair())continue;
    if(one_pair())continue;
    cout<<"null"<<endl;
  }
  return 0;
}

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

void check_multiplicity(const int* sorted_cards, std::map<int,int>& multiplicities)
{
	multiplicities.clear();

	const int* current = sorted_cards;
	const int* end = sorted_cards + 5;
	while (current != end) {
		const int* next = std::upper_bound(current, end, *current);
		++multiplicities[next - current];
		current = next;
	}
}

int count(const std::map<int,int> multiplicities, int multiplicity)
{
	std::map<int,int>::const_iterator i = multiplicities.find(multiplicity);
	return (i != multiplicities.end()) ? i->second : 0;
}

bool check_straight(const int* sorted_cards, const std::map<int,int>& multiplicities)
{
	if (count(multiplicities, 1) != 5) {
		return false;
	}
	return (sorted_cards[4] == sorted_cards[0] + 4)
		|| (sorted_cards[0] == 1 && sorted_cards[1] == 10);
}

int main()
{
	int cards[5] = {};
	while (scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4]) == 5) {
		std::sort(cards, cards + 5);
		std::map<int,int> multiplicities;
		check_multiplicity(cards, multiplicities);

		if (count(multiplicities, 4) > 0) {
			std::cout << "four card\n";
		} else if (count(multiplicities, 3) > 0 && count(multiplicities, 2) > 0) {
			std::cout << "full house\n";
		} else if (check_straight(cards, multiplicities)) {
			std::cout << "straight\n";
		} else if (count(multiplicities, 3) > 0) {
			std::cout << "three card\n";
		} else if (count(multiplicities, 2) == 2) {
			std::cout << "two pair\n";
		} else if (count(multiplicities, 2) == 1) {
			std::cout << "one pair\n";
		} else {
			std::cout << "null\n";
		}
	}
	return 0;
}

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

int str(int a[5], int n){
	int tmp = a[n], i;
	for(i = 0;i < 4 && ++tmp == a[++n];i++){if(tmp == 13 && i == 2)tmp = 0;}
	//cout << endl;
	if(i == 4)return 1;
	else return 0;
}

int main(){
	string s[]={"one pair","two pair","three card","straight","full house","four card","null"};
	int a[5], t[13], ans;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		ans = -1;
		sort(a, a+5);
		for(int i = 0;i < 13;i++)t[i] = count(a, a+5,i+1);
		
		for(int i = 0;i < 13;i++){
			if(t[i] == 3)ans = 2;
			if(ans == 0 && t[i] == 2)ans = 1;
			if(ans == -1 && t[i] == 2)ans = 0;
		}
		//for(int i = 0;i < 5;i++)cout << a[i] << " ";
		if(str(a, 0) || str(a, 1))ans = 3;
		int th = 0, tw = 0, fo = 0;
		for(int i = 0;i < 13;i++){
			if(t[i] == 2)tw = 1;
			if(t[i] == 3)th = 1;
			if(t[i] == 4)fo = 1;
		}
		if(tw && th)ans = 4;
		if(fo)ans = 5;
		if(ans == -1)ans = 6;
		//for(int i = 0;i < 5;i++)printf("%d ", a[i]);
		//for(int i = 0;i < 13;i++)cout << t[i] << " ";
		//cout << "fo" << fo;
		//cout << endl;
		//cout << ans;
		cout << s[ans] << endl;
	}
	return 0;
}