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

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


	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>

using namespace std;

int main(void){
  int x[5],card[14],fg[5],i;
  vector<int>y;
  while(~scanf("%d,%d,%d,%d,%d"
	       ,&x[0],&x[1],&x[2],&x[3],&x[4])){
    
    memset(card,0,sizeof(card));
    memset(fg,0,sizeof(fg));


    for(i=0;i<5;i++)card[x[i]]++;

    for(i=1;i<14;i++){
      if(card[i]==2 && fg[0]==0)fg[0]=1;
      else if(card[i]==2 && fg[0]==1){
	fg[0]=0;
	cout <<"two pair" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==3 && fg[0]!=1)fg[3]=1;
      else if(card[i]==3 && fg[0]==1){
	fg[0]=0;
	cout << "full house" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==4){
	cout << "four card" << endl;
	fg[2]=1;
	break;
      }
    }
    if(fg[0]==1){
      cout << "one pair" << endl;
      fg[2]=1;
    }
    else if(fg[3]==1){
      cout << "three card" << endl;
      fg[2]=1;
    }
    
    for(i=0;i<5;i++)y.push_back(x[i]);
    sort(y.begin(),y.end());
 
    for(i=1;i<4;i++)if(y[i]+1!=y[i+1])fg[4]=1;

    if(!fg[4] && !fg[2]){
      cout << "straight" <<endl;
      fg[2]=1;
    }
    if(fg[2]==0)cout <<"null"<<endl;
    y.clear();
  }

  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int a[5];
int main() {
	while(~scanf("%d,%d,%d,%d,%d", a[0], a[1], a[2], a[3], a[4])) {
		sort(a, a + 5);
		if((a[0] == a[1] || a[3] == a[4]) && a[1] == a[2] && a[2] == a[3]) printf("four card\n");
		if((a[0] == a[1] && a[2] == a[3] && a[3] == a[4]) || (a[0] == a[1] && a[1] == a[2] && a[3] == a[4])) printf("full house\n");
		if(a[0] + 1 == a[1] && a[1] + 1 == a[2] && a[2] + 1 == a[3] && (a[3] + 1) % 13 == a[4] % 13) printf("straight\n");
		if(((a[0] == a[1] || a[2] == a[3]) && a[1] == a[2]) || (a[2] == a[3] && a[3] == a[4])) printf("three card\n");
		else {
			int p = 0; for(int i = 1; i < 5; i++) if(a[i - 1] == a[i]) p++;
			if(p == 2) printf("two pair\n");
			if(p == 1) printf("one pair\n");
			if(p == 0) printf("null\n");
		}
	}
	return 0;
}

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

string paircard(int card[]){

		for(int i=0,k;i<5;i++){
			int x = card[i],y; int ansx =1,ansy=1;
			for(k=0;k<5;k++) if(card[k] != x){ y = card[k]; break;};
			for(int j=0;j<5;j++){
				if(i!=j) if(x == card[j]) ansx++;
				if(k!=j) if(y == card[j]) ansy++;
			}
			if(ansx < ansy) swap(ansx,ansy);
			if(ansx == 4 && ansy ==1) return "four card";
			if(ansx == 3 && ansy ==2) return "full house";
			if(ansx == 3 && ansy ==1) return "three card";
			if(ansx == 2 && ansy ==2) return "two pair";
			if(ansx == 2 && ansy ==1) return "one pair";
		}
		return "null";
}

bool straight(int card[]){
	int ans = 1;
	if(card[0] == 1){
			for(int i=0;i+1<4;i++){
				if(card[1]+i+1 == card[i+2]) ans++;
			}
			if(card[4] == 13 && ans == 4) return true;
		}
	ans = 1;
	for(int i=0;i+1<5;i++){
		if(card[0]+i+1 == card[i+1]) ans++;
	}
	if(ans==5) return true;

	return false;
}


string poker(int card[]){

 	if(straight(card)){return "straight";}

	return paircard(card);
}


int main(){
	char k; int card[5];
	while(1){
		cin>>card[0]>>k>>card[1]>>k>>card[2]>>k>>card[3]>>k>>card[4];
				if(cin.eof())break;
		sort(card,card+5);
		cout << poker(card) << endl;
	}
}

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

int main()
{
	int scard, card[20], full, str, straight;
	
	while (scanf("%d", &scard) != EOF){
		full = str = straight = 0;
		for (int i = 0; i < 15; i++) card[i] = 0;
		card[scard - 1]++;
		for (int i = 1; i < 5; i++){
			scanf(",%d", &scard);
			card[scard - 1]++;
		}
		for (int i = 0; i < 13; i++){
			str = 0;
			if (card[i] == 4) full = 100;
			if (card[i] == 3) full += 3;
			if (card[i] == 2) full += 2;
			if (card[i] == 1) {
				for (int j = i; j < i + 5; j++){
					if (j == 13 && card[0] == 1) str++;
					if (card[j] == 1) str++;
					if (str == 5) straight = 1;
				}
			}
		}
		if (full == 100) cout << "four card" << endl;
		else if (full == 5) cout << "full house" << endl;
		else if (straight == 1) cout << "straight" << endl;
		else if (full == 3) cout << "three card" << endl;
		else if (full == 4) cout << "two pair" << endl;
		else if (full == 2) cout << "one pair" << endl;
		else cout << "null" << endl;
	}
	return(0);
}