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(void) {
  int i, j, k, c[5], t;
  while(scanf("%d", &c[0]) != EOF) {
    for(i = 1; i < 5; ++i) scanf(",%d", &c[i]);
    for(i = 0; i < 5; ++i) if(c[i] == 1) c[i] = 14;
    for(i = 0; i < 5; ++i) for(j = i + 1; j < 5; ++j) if(c[i] > c[j]) t = c[i], c[i] = c[j], c[j] = t;
    if((c[0] == c[1] && c[1] == c[2] && c[2] == c[3]) || (c[3] == c[4] && c[1] == c[2] && c[2] == c[3])) printf("four card\n");
    else if((c[0] == c[1] && c[1] == c[2] && c[3] == c[4]) || (c[0] == c[1] && c[2] == c[3] && c[3] == c[4])) printf("full house\n");
    else if((c[4] == c[3] + 1 || (c[4] == 14 && c[3] == 5)) && c[3] == c[2] + 1 && c[2] == c[1] + 1 && c[1] == c[0] + 1) printf("straight\n");
    else if((c[0] == c[1] && c[1] == c[2]) || (c[2] == c[3] && c[1] == c[2]) || (c[2] == c[3] && c[3] == c[4])) printf("three card\n");
    else if((c[0] == c[1] && c[2] == c[3]) || (c[0] == c[1] && c[3] == c[4]) || (c[1] == c[2] && c[3] == c[4])) printf("two pair\n");
    else if(c[0] == c[1] || c[1] == c[2] || c[2] == c[3] || c[3] == c[4]) printf("one pair\n");
    else printf("null\n");
  }
  return 0;
}

C++: #include <stdio.h>

#define ACE 14
int is4card(int cnt[]);
int isFullHouse(int cnt[]);
int isStraight(int cnt[]);
int is3card(int cnt[]);
int is2pair(int cnt[]);
int is1pair(int cnt[]);

int main(void){
    int c[5];
    int count[ACE+1];
    
    while (scanf("%d,%d,%d,%d,%d", c+0, c+1, c+2, c+3, c+4) != EOF){
        for (int i=2; i<=ACE; i++) count[i]=0;
        for (int i=0; i<5; i++){
            if (c[i]==1) c[i]=ACE;
            count[c[i]]++;
        }
//        for (int i=2; i<=ACE; i++) printf("%d ",count[i]);
//        printf("\n");
        
        if (is4card(count)) printf("four card\n");
        else if (isFullHouse(count)) printf("full house\n");
        else if (isStraight(count)) printf("straight\n");
        else if (is3card(count)) printf("three card\n");
        else if (is2pair(count)) printf("two pair\n");
        else if (is1pair(count)) printf("one pair\n");
        else printf("null\n");
    }
    return 0;
}

int is4card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 4) return 1;
    }
    return 0;
}

int isFullHouse(int cnt[]){
    return is3card(cnt) && is1pair(cnt);
}

int isStraight(int cnt[]){
    int len=0;
    
    for (int i=2; i<=ACE; i++){
        if (cnt[i]==0) len=0;
        else {
            len++;
            if (len==5) return 1;
        }
    }
    return 0;
}

int is3card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 3) return 1;
    }
    return 0;
}

int is2pair(int cnt[]){
    int i,j;
    // find the first pair
    for (i=2; i<=ACE; i++){
        if (cnt[i] == 2) break;
    }
    if (i>ACE) return 0;
    // find second pair
    for (j=2; j<=ACE; j++){
        if (i==j) continue;
        if (cnt[j] == 2) return 1;
    }
    return 0;
}

int is1pair(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 2) return 1;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a[6] = {};
	while(scanf("%d",&a[0])){
		for(int i=1;i<5;i++)scanf(",%d", &a[i]);
			int cnt=0,flag=true,card[13]={},max = 4;
		sort(a,a+5);
		for (int i=0;i<4;i++)for(int j=i+1;j<5;j++)
			if (a[i]==a[j])cnt++;
		int i=0;
		if(a[i]==1&&a[i+1]==10){
			i=1;
			max=5;
			a[5]=14;
		}
		for(;i<max;i++)if(a[i]+1!=a[i+1])flag=0;
if (cnt == 6)printf("four card\n");
else if (cnt == 4)printf("full house\n");
else if (flag)printf("straight\n");
else if (cnt == 3)printf("three card\n");
else if (cnt == 2)printf("two pir\n");
else if (cnt == 1)printf("one pair\n");
else printf("null\n");
}
}

C++: #include<algorithm>
#include<iostream>
#include<stdio.h>
#include<string.h>

int main()
{
	int card[5];
	
	while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
	 	
		int a[20];
		memset( a, 0, sizeof( a ) );
		int c = 0;
		
		for( int i = 0; i < 5; i++ ) a[card[i]]++;
		
		for( int i = 0; i < 5; i++ ){
			 c = std::max( c, (int)std::count( card, card + 5, card[i] ) );
		}
		
		bool f = false;
		int m;
		
		switch( c ){
			case 4:
		 		puts( "four card" );
				break;
			case 3:
				for( int i = 0; i < 5; i++ ){
			 		if( std::count( card, card + 5, card[i] ) == 2 ){
						f = true; 
						break;
					}
				}
				
				if( f ){
				 	puts( "full house" );
				}
				else{
				 	puts( "three card" );
				}
				break;
			case 2:
				for( int i = 0; i < 5; i++ ){
					if( std::count( card, card + 5, card[i] ) == 2 && !f ){
					 	m = card[i];
						f = true;
					}
					if( card[i] != m && std::count( card, card + 5, card[i] ) == 2 && f ){
						puts( "two pair" );
						goto end;
					}
				}
				puts( "one pair" );
				break;
			case 1:	
				for( int i = 1; i <= 10; i++ ){
					if( a[i] == 1 && a[i+1] == 1 && a[i+2] == 1 && a[i+3] == 1 && a[(i+4)%13] == 1 ) f = true;
				}
				
				if( f ){
				 	puts( "straight" );
				}
				else{
					puts( "null" );
				}
				
				break;
		}
		
end:

	}

 	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
int main(){
	int a[5],n;
	char com;
	while(cin>>a[0]>>com>>a[1]>>com>>a[2]>>com>>a[3]>>com>>a[4]){
		sort(a,a+5);
		int n=0;
		for(int i=0;i<5;i++)
			for(int j=i+1;j<5;j++)
				if(a[i]==a[j])n++;
		switch(n){
			case 1:cout<<"one pair"<<endl;break;
			case 2:cout<<"two pair"<<endl;break;
			case 3:cout<<"three card"<<endl;break;
			case 4:cout<<"full house"<<endl;break;
			case 6:cout<<"four card"<<endl;break;
			default:
				bool f=true;
				if(a[0]==1&&a[4]==13)a[0]=14;
				sort(a,a+5);
				for(int i=1;i<5;i++)if(a[0]+i!=a[i])f=false;
				if(f)cout<<"straight"<<endl;
				else cout<<"null"<<endl;
		}
	}
	return 0;
}