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>
using namespace std;

enum {
  null = 0,
  one_pair = 1,
  two_pair = 2,
  three_card = 3,
  four_card = 4,
  full_house = 5,
  straight = 6,
};

int main(void) {
  int card[5];
  int pattern;
  
  while(scanf("%d,%d,%d,%d,%d", &card[0],&card[1],&card[2],&card[3],&card[4]) != EOF) {
    sort(card, card + 5);
    
    pattern = null;
    
    // ストレート
    bool check = true;
    for(int i = 0; i < 4; ++i) {
      if(card[i + 1] != card[i] + 1) {
        check = false;
      }
    }
    if(card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13) {
      check = true;
    }
    if(check) {
      pattern = straight;
    }
    
    // ワンペア・ツーペア
    int count = 0;
    for(int i = 0; i < 4; ++i) {
      if(card[i] == card[i + 1]) {
        ++count;
      }
    }
    if(count == 1) {
      pattern = one_pair;
    }
    if(count == 2) {
      pattern = two_pair;
    }
    
    // スリーカード
    if(card[0] == card[2] || card[1] == card[3] || card[2] == card[4]) {
      pattern = three_card;
    }
    
    // フォーカード
    if(card[0] == card[3] || card[1] == card[4]) {
      pattern = four_card;
    }
    
    // フルハウス
    if((card[0] == card[1] && card[2] == card[4]) || (card[0] == card[2] && card[3] == card[4])) {
      pattern = full_house;
    }
    switch(pattern) {
      case null       : cout << "null" << endl;         break;
      case one_pair   : cout << "one pair" << endl;     break;
      case two_pair   : cout << "two pair" << endl;     break;
      case three_card : cout << "three card" << endl;   break;
      case four_card  : cout << "four card" << endl;    break;
      case full_house : cout << "full house" << endl;   break;
      case straight   : cout << "straight" << endl;     break;
    }
  }
  return 0;
}

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

int main(){
    int tmp[5];
    char com;
    while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
    int hand[15]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }
   
    int pair=0,three=0,str=0,four=0;
    for(int i=1; i<15; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str == 5)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<bits/stdc++.h>
using namespace std;
int main()
{
    int num;
    while(cin>>num){
        char str;
        int hand[14]={};
        hand[num]++;
        for(int i=0;i<4;i++){
            cin>>str>>num;
            hand[num]++;
        }
        bool four=0,three=0,two[2]={};
        for(int i=1,j=0;i<14;i++){
            if(hand[i]==4)four=1;
            else if(hand[i]==3)three=1;
            else if(hand[i]==2){
                two[j]=1;
                j++;
            }
        }
        if(four)cout<<"four card"<<endl;
        else if(three&&two[0])cout<<"full house"<<endl;
        else if(three)cout<<"three card"<<endl;
        else if(two[1])cout<<"two pair"<<endl;
        else if(two[0])cout<<"one pair"<<endl;
        else{
            bool kawa=0;
            for(int i=1;i<=10;i++){
                if(hand[i]==1){
                    for(int j=0;j<5;j++){
                        if(j+i>13&&hand[1]!=1)break;
                        else if(j+i<14&&hand[i+j]!=1)break;
                        if(j==4)kawa=1;
                    }
                }
            }
            if(kawa)cout<<"straight"<<endl;
            else cout<<"null"<<endl;
        }

    }
}

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

int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full 

house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
for(int j=i-1;j>-1;j--){
if(s[j]<=c[i]){
for(int k=i;k>j+1;k--)s[k]=s[k-1];
s[j+1]=c[i];
break;}}
if(s[0]>c[i]){
for(int k=i;k>0;k--)s[k]=s[k-1];
s[0]=c[i];}}
if(s[0]==s[1]||s[1]==s[2]||s[3]==s[4]||s[2]==s[3])ans=1;
if((s[0]==s[1]||s[1]==s[2])&&(s[2]==s[3]||s[3]==s[4]))ans=2;
if(s[0]==s[2]||s[1]==s[3]||s[2]==s[4])ans=3;
if(s[2]+1==s[3]&&s[1]+1==s[2]&&s[3]+1==s[4]&&(s[0]+1==s[1]||(s[0]==1&&s

[4]==13)))ans=4;
if((s[0]==s[2]&&s[3]==s[4])||(s[0]==s[1]&&s[2]==s[4]))ans=5;
if(s[0]==s[3]||s[1]==s[4])ans=6;

for(int i=0;i<7;i++){if(ans==i)cout<<a[i]<<endl;}

}

}

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

using namespace std;
int main(void)
{
	int card[6];
	char kari;
	while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				if(check[i] == 3) three++;
				if(check[i] == 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(three == 1) printf("full house\n");
			else if(pair == 2) printf("two pair\n");
			else printf("one pair\n");
		}
		else if(three == 1) 
		{
			if(pair == 1) printf("full house\n");
			else printf("three card\n");
		}
		else if(four == 1) printf("four card\n");
		else if(st != 1) printf("null\n");
	}
	kitune:
	return 0;
}