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 <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, n = -1;}
	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);
		
		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 && (str(a, 0) || str(a, 1)))ans = 3;
		
		for(int i = 0;ans == -1 && 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;
		}
		
		
		if(ans == -1)ans = 6;
		
		
		cout << s[ans] << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
typedef long long int lld;

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

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

const string ans[7]={"null","one pair","two pair","three card","straight","full house","four card"};

int main(void){
	int a[5];
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
		int cnt[13]={},ans_num=0,tmp=0;
		for(int i=0;i<5;++i) ++cnt[a[i]-1];
		for(int i=1,count=0;i<13+1;++i){
			if(cnt[(i+13)%13]>1)break;
			if(cnt[(i+13)%13]==1)++count;
			if(cnt[(i+13)%13]==0)count=0;
			if(count==5) ans_num=4;
		}
		if(!ans_num){
			for(int i=0;i<13;++i){
				if(cnt[i]==4){ans_num=6;break;}
				if(cnt[i]==3)tmp+=3;
				if(cnt[i]==2)tmp+=2;
			}
			if(tmp==5)ans_num=5;
			if(tmp==4)ans_num=2;
			if(tmp==3)ans_num=3;
			if(tmp==2)ans_num=1;
		}
		cout<<ans[ans_num]<<endl;
	}
	return 0;
}

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

bool f_card(int *check);
bool f_house(int *check);
bool straight(int *check);
bool t_card(int *check);
bool t_pair(int *check);
bool o_pair(int *check);

int main()
{
  int c;
  
  while (~scanf("%d", &c)){
    int check[18] = {0};
    check[c]++;
    for (int i = 0; i < 4; i++){
      scanf(",%d", &c);
      check[c]++;
    }

    if (f_card(check)){
      printf("four card\n");
    }
    else if (f_house(check)){
      printf("full house\n");
    }
    else if (straight(check)){
      printf("straight\n");
    }
    else if (t_card(check)){
      printf("three card\n");
    }
    else if (t_pair(check)){
      printf("two pair\n");
    }
    else if (o_pair(check)){
      printf("one pair\n");
    }
    else {
      printf("null\n");
    }
  }

  return (0);
}

bool f_card(int *check)
{
  for (int i = 1; i <= 13; i++){
    if (check[i] == 4){
      return (true);
    }
  }

  return (false);
}

bool f_house(int *check)
{
  bool three = false, two = false;

  for (int i = 1; i <= 13; i++){
    if (check[i] == 3){
      three = true;
    }
    if (check[i] == 2){
      two = true;
    }
  }

  if (three && two){
    return (true);
  }
  else {
    return (false);
  }
}

bool straight(int *check)
{
  for (int i = 1; i <= 13; i++){
    if (check[i] == 1){
      if (check[i + 1] && check[i + 2] && check[i + 3] && check[i + 4]){
        return (true);
      }
      if (i == 10 && check[11] && check[12] && check[13] && check[1]){
        return (true);
      }
    }
  }

  return (false);
}

bool t_card(int *check)
{
  for (int i = 1; i <= 13; i++){
    if (check[i] == 3){
      return (true);
    }
  }

  return (false);
}

bool t_pair(int *check)
{
  for (int i = 1; i <= 13; i++){
    if (check[i] == 2){
      for (int j = 1; j <= 13; j++){
        if (j != i && check[j] == 2){
          return (true);
        }
      }
      break;
    }
  }

  return (false);
}

bool o_pair(int *check)
{
  for (int i = 1; i <= 13; i++){
    if (check[i] == 2){
      return (true);
    }
  }

  return (false);
}