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

int main(){
	int a[5],c[5]={0};
	int i;
	char x;
	while(cin>>a[0]){
		if(a[0]==1)a[0]+=13;
		for(i=1;i<5;i++){
			cin>>x>>a[i];
			if(a[i]==1)a[i]+=13;
			}
		
		c[0]=c[1]=c[2]=c[3]=0;
		sort(a,a+5);
		
		for(i=0;i<5;i++)
			if(a[i]==a[i+1])c[0]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[1]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[2]++; else break;
		for(i=i+1;i<5;i++)
			if(a[i]==a[i+1])c[3]++; else break;
		if(c[0]==0&&c[1]==0&&c[2]==0&&c[3]==0)
			for(i=0;i<4;i++)if(a[i]+1==a[i+1])c[4]=1; else {c[4]=0;break;}
		
		sort(c,c+4,greater<int>());
		if(c[0]==2&&c[1]==1)cout<<"full house";
		else if(c[0]==1&&c[1]==1)cout<<"two pair";
		else if(c[0]==1)cout<<"one pair";
		else if(c[0]==2)cout<<"three card";
		else if(c[0]==3)cout<<"four card";
		else if(c[4]==1)cout<<"straight";
		else cout<<"null";
		cout<<endl;
		
	}



}

C++: #include <stdio.h>

int compare_int (const void* a,const void* b) {

  return (*(int*)a-*(int*)b);

}

int main(void) {

  int hand[5];
  
  int overlap[5];
  int used[5];

  int count;
  int full_or_three=-1;
  int two_or_one=-1;
  int temp;
  int i,j,k,l,m=0;

  char c;

  while(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4])!=EOF) {

    //sort current hand
    qsort(hand,sizeof(hand)/sizeof(hand[0]),sizeof(int),compare_int);

    //for(i=0;i<5;i++) printf("%d ",hand[i]);
  
    //count overlapped cards
    count=0;

    for(i=0;i<5;i++) {

      overlap[i]=0;
      used[i]=0;
    }

    for(i=0;i<4;i++) {

      if(used[i]==1) continue;
    
      for(j=i+1;j<5;j++) {

	if(used[j]==0 && hand[i]==hand[j]) {

	  overlap[count]++;

	  used[i]=used[j]=1;

	}

      }

      used[i]=1;

      count++;

    }

    //for(i=0;i<5;i++) printf("%d ",overlap[i]);

    //check overlapped cards
  
    //four card?
    for(i=0;i<5;i++) {

      if(overlap[i]==3) {

	printf("four card\n");

	goto Terminate;
      
      }

    }

    //full house or three card?
    for(i=0;i<5;i++) {
    
      if(overlap[i]==2) {

	for(j=0;j<5;j++) {

	  if(overlap[j]==1) {

	    printf("full house\n");

	    goto Terminate;

	  }

	}

	printf("three card\n");

	goto Terminate;

      }

    }

    if(full_or_three==1) {

      for(i=0;i<5;i++) {

	if(overlap[i]==1) {

	  printf("full house\n");

	  goto Terminate;

	}

	else {

	  printf("three card\n");

	  goto Terminate;

	}

      }

    }

    //straight?
    if(hand[0]+1==hand[1] && hand[1]+1==hand[2] && hand[2]+1==hand[3] && hand[3]+1==hand[4] || (hand[0]==1 && hand[1]==10 && hand[2]==11 && hand[3]==12 && hand[4]==13)) {

      printf("straight\n");

      goto Terminate;

    }

    //two pair or one pair?
    for(i=0;i<4;i++) {

      if(overlap[i]==1) {

	for(j=i+1;j<5;j++) {

	  if(overlap[j]==1) {

	    printf("two pair\n");

	    goto Terminate;

	  }

	}

	printf("one pair\n");

	goto Terminate;

      }

    }

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

  Terminate:
    continue;

  }

  return 0;

}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define MAX_N 5001
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<string, ll> PS;
typedef vector<ll> V;

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int co[110];
char k;
int a;

int main(){
	while (cin >> a){
		REP(i, 100){
			co[i] = -1;
		}
		co[a] = 1;
		REP(i, 4){
			cin >> k >> a;
			if (co[a] == -1){
				co[a] = 1;
			}
			else co[a]++;
		}

		bool f = 0;
		for (int i = 1; i <= 9; i++){
			if (co[i]==1 && co[i + 1]==1 && co[i + 2]==1 && co[i + 3]==1 && co[i + 4]==1){
				cout << "straight" << endl;
				f = 1;
				break;
			}
		}
		if (f)continue;
		if (co[1]==1 && co[10]==1 && co[11]==1 && co[12]==1 && co[13]==1){
			cout << "straight" << endl;
			continue;
		}

		int p2 = 0, p3 = 0, p4 = 0;
		REP(i, 14){
			if (co[i] == 4)p4++;
			if (co[i] == 3)p3++;
			if (co[i] == 2)p2++;
		}
		if (p4)	cout << "four card" << endl;
		else if (p3&&p2)cout << "full house" << endl;
		else if (p3)cout << "three card" << endl;
		else if (p2 == 2)cout << "two pair" << endl;
		else if (p2)cout << "one pair" << endl;
		else cout << "null" << endl;
	}
}

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

using namespace std;

int straight(int[]);

int main() {

	int ans, h[5];

	while(scanf("%d,%d,%d,%d,%d", &h[0], &h[1], &h[2], &h[3], &h[4])!=EOF) {
		ans=0;
		for(int i=0; i<4; i++) {
			for(int j=i+1; j<5; j++) {
				if(h[i]==h[j])
					ans++;
			}
		}
		switch(ans) {
			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:
				if(straight(h))
					cout << "straight" << endl;
				else
					cout << "null" << endl;
		}
	}
	
	return 0;

}

int straight(int h[5]) {
	
	sort(h, h+5);
	for(int i=0; i<9; i++) {
		if(h[0]==i&&h[1]==i+1&&h[2]==i+2&&h[3]==i+3&&h[4]==i+4||h[0]==1&&h[1]==10&&h[2]==11&&h[3]==12&&h[4]==13)
			return 1;
	}

	return 0;

}