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 <algorithm>
#include <cstdio>
using namespace std;

int cards[5];

bool check ()
{
     for (int i = 0; i < 5; i++) if (cards[i] > 0) return true;
     return false;
}

void ref() { for (int i = 0; i < 5; i++) cards[i] = 0; }

int main()
{
     while (scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4]) != EOF) {
          int yaku = 0;

          sort(cards, cards + 5);

          if (check() && cards[0] == cards[1] && cards[1] == cards[2] && cards[2] == cards[3]) {yaku = 6; ref();}
          if (check() && cards[1] == cards[2] && cards[2] == cards[3] && cards[3] == cards[4]) {yaku = 6; ref();}
          if (check() && cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4]) {yaku = 5; ref();}
          if (check() && cards[2] == cards[3] && cards[3] == cards[4] && cards[0] == cards[1]) {yaku = 5; ref();}
          if (check() && cards[0] + 1 == cards[1] && cards[1] + 1 == cards[2] && cards[2] + 1 == cards[3] && cards[3] + 1 == cards[4]) {yaku = 4; ref();}
          if (check() && cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13) {yaku = 4; ref();}

          int tmp = 0;
          for (int i = 0; i < 5 && check(); i++) {
               int t = cards[i];
               cards[i] = 0;
               if (t == 0) continue;
               for (int j = 0; j < 5; j++) {
                    if (i == j) continue;
                    if (cards[j] == 0) continue;
                    if (t == cards[j]) tmp++;
               }
               yaku = tmp;
          }

          switch (yaku) {
          case 1: cout << "one pair" << endl; break;
          case 2: cout << "two pair" << endl; break;
          case 3: cout << "three card" << endl; break;
          case 5: cout << "full house" << endl; break;
          case 6: cout << "four card" << endl; break;
          case 4: cout << "straight" << endl; break;
          default: cout << "null" << endl;
          }
     }

     return 0;
}

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

int main(){
	int c[5];
	while( scanf(" %d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF ){
		sort(c, c+5);
		
		//four card
		bool flag=true;
		for(int i=0; i<=2; ++i){
			if(c[i] != c[i+1]) flag=false;
		}
		if(flag){
			printf("four card\n");
			continue;
		}
		flag=true;
		for(int i=1; i<=3; ++i){
			if(c[i] != c[i+1]) flag=false;
		}
		if(flag){
			printf("four card\n");
			continue;
		}
		
		//full house
		flag=false;
		if(c[0]==c[1] && c[2]==c[3] && c[3]==c[4]) flag=true;
		if(c[0]==c[1] && c[1]==c[2] && c[3]==c[4]) flag=true;
		if(flag){
			printf("full house\n");
			continue;
		}
		
		//straight	
		flag=true;	
		for(int j=0; j<=4; ++j){
			if(c[j]!=c[0]+j) flag=false;
		}
		if(flag){
			printf("straight\n");
			continue;
		}

		if(c[0]==1){
			flag=true;
			for(int i=1; i<=4; ++i){
				if(c[i]!=9+i) flag=false;	
			}	
		}
		if(flag){
			printf("straight\n");
			continue;
		}
		
		//three card
		flag=false;
		for(int i=0; i<=2; ++i)
			if(c[i]==c[i+1] && c[i+1]==c[i+2]) flag=true;
		if(flag){
			printf("three card\n");
			continue;
		}	
		
		//two pair
		flag=false;
		if(c[0]==c[1] && c[2]==c[3]) flag=true;
		if(c[0]==c[1] && c[3]==c[4]) flag=true;
		if(c[1]==c[2] && c[3]==c[4]) flag=true;
		if(flag){
			printf("two pair\n");
			continue;
		}	

		//one pair
		flag=false;
		for(int i=0; i<=3; ++i)
			if(c[i]==c[i+1]) flag=true;		
	
		if(flag){
			printf("one pair\n");
			continue;
		}	

		//null
		printf("null\n");
	}
}

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

int c[5];// card

bool straight()
{
    if(c[4]==13 && c[3]==12 && c[2]==11 && c[1]==10 && c[0]==1)
        return true;
    for(int i=0; i<4; i++) {
        if(c[i+1] - c[i] != 1)
            return false;
    }
    return true;
}

int main(void)
{
    while(~scanf("%d %d %d %d %d", c, c+1, c+2, c+3, c+4)) {
        sort(c, c+5);
        if(c[0] == c[3] || c[1] == c[4]) {
            puts("four card");
        } else if((c[0] == c[2] && c[3] == c[4]) ||
                (c[0] == c[1] && c[2] == c[4])) {
            puts("full house");
        } else if(straight()) {
            puts("straight");
        } else if(c[0]==c[2] || c[1]==c[3] || c[2]==c[4]) {
            puts("three card");
        } else if((c[0]==c[1] && (c[2]==c[3] || c[3]==c[4])) ||
                (c[1]==c[2] && c[3]==c[4])) {
            puts("two pair");
        } else if(c[0]==c[1] || c[1]==c[2] || c[2]==c[3] || c[3]==c[4]) {
            puts("one pair");
        } else {
            puts("null");
        }   
    }


    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
	
	while(1){
	int a=0,b,c,d,e,x;
	scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);
	for(int i=0;i<5;i++){
		if(a>b){x=a;a=b;b=x;}
		if(b>c){x=b;b=c;c=x;}
		if(c>d){x=c;c=d;d=x;}
		if(d>e){x=d;d=e;e=x;}
	}
	if(a==0)return 0;
	if(b==c&&c==d&&(a==b||d==e))cout<<"four card"<<endl;
	else if(a==b&&d==e&&(b==c||c==d))cout<<"full house"<<endl;
	else if(a==b&&b==c||b==c&&c==d||c==d&&d==e)cout<<"three card"<<endl;
	else if(a==b&&(c==d||d==e)||b==c&&d==e)cout<<"two pair"<<endl;
	else if(a==b||b==c||c==d||d==e)cout<<"one pair"<<endl;
	else if((b==a+1||b==a+9)&&c==b+1&&d==c+1&&e==d+1)cout<<"straight"<<endl;
	else cout<<"null"<<endl;
	}
}