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

int card[13];

void c_card(){
  for(int i=0; i<13; i++){
    card[i]=0;
  }
}

void judge(){
  int count2=0, count3=0;
  bool flag = false;
  for(int i=0; i<13; i++){
    if(card[i] == 2){ count2++; flag = true; }
    if(card[i] == 3){ count3++; flag = true; }
    if(card[i] == 4){ cout << "four card" << endl; flag = true;}

    if(card[i%13]== 1 && card[(i+1)%13]==1 && card[(i+2)%13]==1 && card[(i+3)%13]==1 && card[(i+4)%13]==1){
      if(card[10]==1 && card[11]==1 && card[12]==1 && card[0]==1 && card[1]==1){
	continue;
      }
      else{
	cout << "straight" << endl;
	flag = true;
      }
    }

  }
  
  if(count2==1 && count3==0) cout << "one pair" << endl;
  if(count2==2) cout << "two pair" << endl;
  if(count2==0 && count3==1) cout << "three card" << endl;
  if(count2==1 && count3==1) cout << "full house" << endl;

  if(!flag) cout << "null" << endl;
}


int main(){
  int c[5];
  while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
    c_card();
    for(int i=0; i<5; i++)
      card[c[i]-1]++;

    judge();

  }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
using namespace std;
string s[]={"one pair","two pair","three card","straight","null"};

int str(int n){
	cout << s[n] << endl;
	return 0;
}

int main(){
	int a[5], t[14], ans, m;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4]) != EOF){
		ans = -1, m = 0;
		sort(a, a+5);
		fill(t, t+14, 0);
		for(int i = 0;i < 5;i++){
			t[a[i]]++;
			if(m < t[a[i]])m = t[a[i]];
		}
		
		int flag = 0;
		if(a[0]==1&&a[1]==10&&a[2]==11&&a[3]==12&&a[4]==13){str(3);continue;}
		for(int i = 1;i < 5 && a[i-1]+1 == a[i];i++)flag = i;
		if(flag == 4){str(3);continue;}
		
		if(m == 4){cout << "four card" << endl;continue;}
		if(m == 3){
			int f = 1;
			for(int i = 1;i <= 13;i++){
				if(t[i] == 2)f = 0;
			}
			if(!f){cout << "full house" << endl;continue;}
			ans = 2;
		}
		
		for(int i = 1;i <= 13;i++){
			if(!ans && t[i] == 2)ans = 1;
			if(ans != 1 && t[i] == 2)ans = 0;
		}
		if(ans == -1)ans = 4;
		str(ans);
	}
	return 0;
}

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

int card[5];
map<int, int> table;

int main() {
  while (1) {
    table.clear();
    if (scanf("%d", &card[0]) != 1) break;
    for (int i=1; i<5; i++) {
      getchar();
      scanf("%d", &card[i]);
    }

    sort(card, card+5);
    for (int i=0; i<5; i++) {
      table[card[i]]++;
    }
  
    int num_straight = 0;
    for (int i=0; i<4; i++) {
      num_straight += (card[i+1] == card[i] + 1);
    }
  
    if (table[card[0]] == 4 || table[card[4]] == 4) puts("four card");
    else if (table.size() == 2) puts("full house");
    else if (num_straight + (card[0] == 1 && card[4] == 13 && card[1] != 2) >= 4) puts("straight");
    else if (table[card[1]] == 3 || table[card[3]] == 3) puts("three card");
    else if (table[card[1]] + table[card[3]] == 4) puts("two pair");
    else if (table.size() < 5) puts("one pair");
    else puts("null");
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a[6] = {};
	while(scanf("%d",&a[0])!=EOF){
		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 pair\n");
else if (cnt == 1)printf("one pair\n");
else printf("null\n");
}
}

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

using namespace std;

int main(void){
  int i,j,k,l;
  int card[5];
  int poker_hand;
  bool flag;

  while(true){
    poker_hand=0;
    for(i=0;i<5;i++){
      if(scanf("%d,",&card[i])==EOF)return(0);
    }
    sort(card,card+5);
    for(i=0;i<4;i++){
      if(card[i]==card[i+1])poker_hand=1;
    }
    if(card[0]==card[1]&&card[2]==card[3])poker_hand=2;
    if(card[0]==card[1]&&card[3]==card[4])poker_hand=2;
    if(card[1]==card[2]&&card[3]==card[4])poker_hand=2;
    for(i=0;i<3;i++){
      if(card[i]==card[i+1]&&card[i]==card[i+2])poker_hand=3;
    }
    flag=true;
    for(i=1;i<5;i++){
      if(card[i]!=card[0]+i)flag=false;
    }
    if(flag)poker_hand=4;
    flag=true;
    if(card[0]==1&&card[1]==10){
      for(i=1;i<4;i++){
	if(card[i+1]!=card[1]+i)flag=false;
      }
    }else{
      flag=false;
    }
    if(flag)poker_hand=4;
    if(card[0]==card[1]&&card[0]==card[2]&&card[3]==card[4])poker_hand=5;
    if(card[0]==card[1]&&card[2]==card[3]&&card[2]==card[4])poker_hand=5;
    if(card[0]==card[3])poker_hand=6;
    if(card[1]==card[4])poker_hand=6;

    
    switch (poker_hand) {
      case 0:
	printf("null\n");
	break;
      case 1:
	printf("one pair\n");
	break;
      case 2:
	printf("two pair\n");
	break;
      case 3:
	printf("three card\n");
	break;
      case 4:
	printf("straight\n");
	break;
      case 5:
	printf("full house\n");
	break;
      case 6:
	printf("four card\n");
	break;
    }
  }
  return(0);
}