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<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a;  i ++)
int main(void){
  vector<int> array(5);
  vector<int> original;
  vector<int> card(14);
  string s;  
  while(cin>>s){
    rep(i,5)array[i]=0;
    rep(i,14)card[i]=0;
    for(int i = 0, j = 0 ; i < s.size() ; i ++){
      if(s[i] == ','){
	j++;continue;
      }
      array[j] = array[j] * 10 +s[i]-'0';
    }
    rep(i,5)card[array[i]]++;
    original = card;
    sort(card.begin(),card.end(),greater<int>());
    
    //rep(i,5)cout<<card[i]<<endl;
    if(
       (card[0 ] == 1 && card[1 ] == 1 && card[2 ] == 1 && card[3 ] == 1 && card[4] == 1 ) 
       ){
      bool check=0;
      rep(i,4){
	if(array[i] != array[i+1] - 1){
	  check = 1;
	  break;
	}
      }
      //rep(i,14)cout<<card[i]<<" ";cout<<endl;
      if(!check)cout<<"straight"<<endl;
      else if((original[1] == 1 && original[10] == 1 && original[11] == 1 && original[12] == 1 && original[13] == 1 )){
	cout<<"straight"<<endl;
      }else cout<<"null"<<endl;
      continue;
    }
    sort(array.begin(),array.end());
    switch(card[0]){
    case 4:
      cout<<"four card"<<endl;break;
    case 3:
      if(card[1]==2){
	cout<<"full house"<<endl;
      }else{
	cout<<"three card"<<endl;
      }
      break;
    case 2:
      if(card[1]==2){
	cout<<"two pair"<<endl;
      }else{
	cout<<"one pair"<<endl;
      }
      break;
    default:
      cout<<"null"<<endl;
    }
  }
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void){

    int a[5]={0};
    string str="null";
    while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
        sort(a,a+5);
        if(((a[0]==a[1])&&(a[2]==a[3])&&(a[2]==a[1]))||((a[1]==a[2])&&(a[2]==a[3])&&(a[3]==a[4])))str="four card";
        else if(((a[0]==a[1])&&(a[1]==a[2])&&(a[3]==a[4]))||((a[0]==a[1])&&(a[2]==a[3])&&(a[3]==a[4])))str="full house";
        else if(((a[0]==1)&&(a[1]==10)&&(a[2]==11)&&(a[3]==12)&&(a[4]==13))||((a[0]+1==a[1])&&(a[1]+1==a[2])&&(a[2]+1==a[3])&&(a[3]+1==a[4])))str="straight";
        else if(((a[0]==a[1])&&(a[1]==a[2]))||((a[1]==a[2])&&(a[2]==a[3]))||((a[2]==a[3])&&(a[3]==a[4])))str="three card";
        else if(((a[0]==a[1])&&((a[2]==a[3])||(a[3]==a[4])))||((a[1]==a[2])&&(a[3]==a[4])))str="two pair";
        else if((a[0]==a[1])||(a[1]==a[2])||(a[2]==a[3])||(a[3]==a[4]))str="one pair";

        cout<<str<<endl;
    }
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)

vector<int> a(5);

string solve(){
    sort(a.begin(), a.end());
    int pair = 0;
    rep(i,5)rep(j,i) if(a[i] == a[j]) pair++;
    bool straight = true;
    rep(i,4) if(a[i] + 1 != a[i+1]) straight = false;
    if(a[0]==1 &&
       a[1]==10 &&
       a[2]==11 &&
       a[3]==12 &&
       a[4]==13) return "straight";
    if(straight) return "straight";

    if(pair == 6) return "four card";
    else if(pair == 4) return "full house";
    else if(pair == 3) return "three card";
    else if(pair == 2) return "two pair";
    else if(pair == 1) return "one pair";
    else return "null";
}

int main(){
    while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
        cout << solve() << endl;
    }
}

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

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define For(i,a,b) for(int (i)=(a); (i)<(b); (i)++)

bool twopair(int a, int b, int c, int d, int e) {
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    v.push_back(d);
    v.push_back(e);
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    if (v.size() == 3) return true;
    else return false;
}

bool straight(int a, int b, int c, int d, int e) {
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    v.push_back(d);
    v.push_back(e);
    sort(v.begin(), v.end());
    if (v[4]-v[3] == 1 && v[3]-v[2] == 1 && v[2]-v[1] == 1) {
        if (v[1]-v[0] == 1 || (v[0] == 1 && v[4] == 13)) return true;
        else return false;
    }else return false;
}

bool fullhouse(int a, int b, int c, int d, int e) {
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    v.push_back(d);
    v.push_back(e);
    sort(v.begin(), v.end());
    if (v[3] == v[4]) return true;
    else return false;
}
    
int getMaxPair(int a, int b, int c, int d, int e) {
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    v.push_back(d);
    v.push_back(e);
    sort(v.begin(), v.end());
    vector<int> cnt;
    int crt = 0;
    int min = v[0];
    REP(i,4) {
        if (v[i+1] == min) {
            crt++;
        }else {
            cnt.push_back(crt);
            min = v[i+1];
            crt = 0;
        }
    }
    cnt.push_back(crt);
    sort(cnt.begin(), cnt.end());
    return cnt.back() + 1;
}

int main() {
    int a,b,c,d,e;
    char ch;
    while(cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e) {
        switch(getMaxPair(a,b,c,d,e)) {
            case 1:
                if (straight(a,b,c,d,e)) {
                    cout << "straight" << endl;
                }else {
                    cout << "null" << endl;
                }
                break;
            case 2:
                
                if (twopair(a,b,c,d,e)) {
                    cout << "two pair" << endl;
                }else {
                    cout << "one pair" << endl;
                }
                break;
            case 3:
                if (fullhouse(a,b,c,d,e)) {
                    cout << "full house" << endl;
                }else {
                    cout << "three card" << endl;
                }
                break;
            case 4:
                cout << "four card" << endl;
        }
    }
    
    return 0;
}