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>
#include<vector>
#include<sstream>
using namespace std;

vector<string> split(const string &str, char delim){
  istringstream iss(str); string tmp; vector<string> res;
  while(getline(iss, tmp, delim)) res.push_back(tmp);
  return res;
}

bool forcard(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans >= 4) return true;
		ans = 1;
	}
	return false;
}

bool fullhouse(vector<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 == 3 && ansy ==2) return true;
			if(ansx == 2 && ansy ==3) return true;
		}
		return false;
}

bool straight(vector<int> card){
	int ans = 1;
	if(card[0] != 1){
		for(int i=0;i+1<5;i++){
			if(card[0]+i+1 == card[i+1]) ans++;
		}
		if(ans==5) return true;
	} else {
		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;
	}
	return false;
}

bool threecard(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans == 3) return true;
		ans = 1;
	}
	return false;
}

bool twopair(vector<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 == 2 && ansy ==2) return true;
		}
		return false;
}

bool onepair(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans == 2) return true;
		ans = 1;
	}
	return false;
}
string poker(vector<int> card){
	if(forcard(card)) {return "four card"; } else
	if(fullhouse(card)){ return "full house"; } else
 	if(straight(card)){return "straight";} else
	if(threecard(card)){ return "three card";} else
	if(twopair(card)){ return "two pair";} else
	if(onepair(card)){ return "one pair";}
	return "null";
}


int main(){
	string str; vector<string> st; vector<int> card;
	while(cin >> str){
		st = split(str,',');
		for(int i=0;i<5;i++){
			stringstream ss; int a;
			ss << st[i];
			ss >> a;
			card.push_back(a);
		}
		sort(card.begin(),card.end());
		cout << poker(card) << endl;

		card.clear();
	}

}

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>
#include <math.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){
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	string ret="";
	foreach(it,count){
		if(it->second>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(it->second==4){
			ret = "four card";
		}else if(it->second==3){
			is3 = true;
		}else if(it->second==2){
			if(is3){
				ret = "full house";
			}else if(is2){
				ret = "two pair";
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}else if(ret!=""){
		return ret;
	}else 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 <iostream>

using namespace std;

int main(){
  while(1){
    int card[13]={0};
    int tehai[5]={0};
    char ch;
    int pair=0;
    int p_flag=0,t_flag=0,f_flag=0,s_flag=0;
    
    cin>>tehai[0]>>ch>>tehai[1]>>ch>>tehai[2]>>ch>>tehai[3]>>ch>>tehai[4];
    
    for(int i=0;i<5;i++){
      for(int j=0;j<13;j++){
        if(tehai[i]==j+1)
          card[j]++;
      }
    }

    for(int i=0;i<9;i++){
      if(card[i]==1 && card[i+1]==1 && card[i+2]==1 && card[i+3]==1 && card[i+4]==1)
        s_flag=1;
    }

    if(card[0]==1 && card[9]==1 && card[10]==1 && card[11]==1 && card[12]==1)
      s_flag=1;
    
    for(int i=0;i<13;i++){
      if(card[i]==2){
        pair++;
        p_flag=1;
      }
      if(card[i]==3)
        t_flag=1;
      if(card[i]==4)
        f_flag=1;
    }

    if(pair==1 && p_flag==1 && t_flag==0 && f_flag==0)
      cout<<"one pair"<<endl;
    else if(pair==2 && p_flag==1 && t_flag==0 && f_flag==0)
      cout<<"two pair"<<endl;
    else if (p_flag==0 && t_flag==1 && f_flag==0)
      cout<<"three card"<<endl;
    else if (p_flag==0 && t_flag==0 && f_flag==1)
      cout<<"four card"<<endl;
    else if (p_flag==1 && t_flag==1 && f_flag==0)
      cout<<"full house"<<endl;
    else if (s_flag==1)
      cout<<"straight"<<endl;
    else
      cout<<"null"<<endl;
  }

  return 0;
}