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++: // AOJ q0038
// YAMADA Terushige
// 2013.5.6

#include<iostream>
#include<set>
#include<vector>
 
using namespace std;
 
int main(){
  int card;
  char c;
  while(cin >> card){
    string ans = "null";
    vector<int> num(15,0);
    set<int> spc;
    num[card]++;
    spc.insert(card);
    for(int i=0;i<4;i++){
      cin >> c >> card;
      num[card]++;
      spc.insert(card);
    }
    num[14]=num[1];

    int max = 0;
    for(int i=1;i<=13;i++)
      if(num[i]>max) max= num[i];

    switch(max){

    case 4:
      ans = "four card";
      break;

    case 3:
      if(spc.size()==3) ans = "three card";
      else if(spc.size()==2) ans = "full house";
      break;

    case 2:
      if(spc.size()==4) ans = "one pair";
      else if(spc.size()==3) ans = "two pair";
      break;
      
    case 1:	
      for(int i=1;i<=10;i++){
	int j;
	for(j=0;j<5;j++)
	  if(num[i+j]!=1) break;
	if(j==5){
	  ans = "straight";
	  break;
	}
      }

    }
    cout << ans << endl;	
  }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

string judge(int[] nums){
	set<int> st;
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		st.insert(nums[i]);
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	foreach(it,count){
		if(*it>0){
			c++; mc=max(mc,c);
		}else{
			c=0;
		}
		if(*it==4){
			return "four card";
		}else if(*it==3){
			is3 = true;
		}else if(*it==2){
			if(is3){
				return "full house";
			}else if(is2){
				return "two pair";
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}

int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}

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

using namespace std;

int main(void)
{
	char c[5];
	int i, j;
	int sum[14];
	int max, max2;
	
	while (scanf("%d, %d, %d, %d, %d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF){
		
		for (i = 0; i < 14; i++){
			sum[i] = 0;
		}
		
		
		for (i = 0; i < 5; i++){
			sum[c[i]-1]++;
		}
		
		max = 0;
		max = 0;
		
		for (i = 0; i < 14; i++){
			if (max < sum[i]){
				max = sum[i];
			}
			else if (max2 < sum[i]){
				max2 = sum[i];
			}
		}
		
		int ch;
		
		for (i = 0; i < 10; i++){
			
			ch = 0;
			
			for (j = 0; j < 5; j++){
				
				if (sum[(i + j) % 13] == 1){
					ch++;
				}
			}
			if (ch == 5){
				break;
			}
		}
		
		if (max == 4){
			printf("four card\n");
		}
		else if (max == 3 && max2 == 2){
			printf("full house\n");
		}
		
		
		else if (ch == 5){
			printf("straight\n");
		}
		
		else if (max == 3){
			printf("three card\n");
		}
		else if (max == 2 && max2 == 2){
			printf("two pair\n");
		}
		else if (max == 2){
			printf("one pair\n");
		}
		else {
			printf("null\n");
		}
	}
	return (0);
}

C++: #include <iostream>
#include <string>

using namespace std;

class poker{
private:
	int cardCnt[13];
	string audit;
	bool onePair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 1;
	}
	bool twoPair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 2;
	}
	bool threeCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				return true;
			}
		}
		return false;
	}
	bool straight(){
		const int exception[] = {1,0,0,0,0,0,0,0,0,1,1,1,1};
		for(int i = 0;i < 10;i++){
			if(cardCnt[i] == 1 && cardCnt[i + 1] == 1 && cardCnt[i + 2] == 1 && cardCnt[i + 3] == 1 && cardCnt[i + 4] == 1){
				return true;
			}
		}
		for(int i = 0;i < 13;i++){
			if(exception[i] != cardCnt[i]){
				return false;
			}
		}
		return true;
	}
	bool fullHouse(){
		bool b1 = false, b2 = false;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				b1 = true;
			}else if(cardCnt[i] == 2){
				b2 = true;
			}
		}
		return b1 && b2;
	}
	bool fourCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 4){
				return true;
			}
		}
		return false;
	}
public:
	string getAudit(){
		return audit;
	}
	poker(int c[5]){
		for(int i = 0;i < 13;i++){
			cardCnt[i] = 0;
		}
		for(int i = 0;i < 5;i++){
			cardCnt[c[i] - 1]++;
		}
		if(fourCard()){
			audit = "four card";
		}else if(fullHouse()){
			audit = "full house";
		}else if(straight()){
			audit = "straight";
		}else if(threeCard()){
			audit = "three card";
		}else if(twoPair()){
			audit = "two pair";
		}else if(onePair()){
			audit = "one pair";
		}else{
			audit = "null";
		}
	}
};

int main(void){
	int crd[5];
	while(1){
		if(cin.eof()){
			break;
		}
		for(int i = 0;i < 5;i++){
			cin >> crd[i];
			cin.get();
		}
		poker p(crd);
		cout << p.getAudit() << endl;
	}
}