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

bool is_straight(int* cards) {
	bool array[13] = { false };
	for(int i=0;i<5;i++){
		array[cards[i] - 1] = true;
	}
	if (array[0] && array[1] && array[12])return false;
	int tmp = 0;
	for (int i = 0; i < 20; i++) {
		if (i>12) {
			if (array[i - 13] == true)tmp++;
			else tmp = 0;
		}
		else {
			if (array[i] == true)tmp++;
			else tmp = 0;
		}
		if (tmp == 5)return true;
	}
	return false;
}
int main() {
	int cards[5];
	while (scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4]) != EOF) {
		int same_cards1 = 0, same_cards2 = 4; int tmp;

		for (int i = 0; i < 5; i++) {
			tmp = 0;
			for (int j = 0; j < 5; j++) {
				if (cards[i] == cards[j])tmp++;
			}
			if (tmp > same_cards1)same_cards1 = tmp;
			if (tmp < same_cards2)same_cards2 = tmp;
		}
		if (same_cards1 == 4)cout << "four cards" << endl;//clear
		else if (same_cards1 == 3 && same_cards2 == 2)cout << "full house" << endl;//clear
		else if (is_straight(cards))cout << "straight" << endl;
		else if (same_cards1==3)cout << "three cards" << endl;//clear
		else if (5-same_cards1-same_cards2==2)cout << "two pair" << endl;//clear
		else if (same_cards1 == 2)cout << "one pair" << endl;//clear
		else cout << "null" << endl;
	}
}

C++: #include <iostream>
#include <algorithm>
#include <vector> 
using namespace std;
#define pb push_back
int main(void){
	char buf;
	int tmp;
	while(cin >> tmp){
		vector<int> list;
		if(cin.eof())
			break;
		list.pb(tmp);
		for(int i=0;i<4;i++){
			cin >> buf >> tmp;
			list.pb(tmp);
		}
		sort(list.begin(),list.end());
		int card[14]={0};
		for(int i=0;i<5;i++)
			card[list[i]]++;
		int cmax=0,cnmax=0,series=1;
		for(int i=1;i<=13;i++){
			if(cmax < card[i]){
				cnmax=cmax;
				cmax=card[i];
			}else if(cnmax < card[i])
				cnmax=card[i];
			if(card[i]&&card[i-1])
				series++;
			else if(series!=5)
				series=1;
		}
		if(series==4&&card[1])
			series++;
		
		if(cmax==4)
			cout << "four card"<< endl;
		else if(cmax==3&&cnmax==2)
			cout <<"full house" << endl;
		else if(series == 5)
			cout << "straight" << endl;
		else if(cmax==3)
			cout <<"three card" << endl;
		else if(cmax==2 && cnmax==2)
			cout <<"two pair" << endl;
		else if(cmax==2)
			cout <<"one pair" << endl;
		else
			cout <<"null" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
  int a,b,c,d,e,k[14],max,max2,str,straight;
  char s;
  while(cin>>a>>s>>b>>s>>c>>s>>d>>s>>e){
    for(int i=1;i<=13;i++)k[i]=0;
    k[a]++;
    k[b]++;
    k[c]++;
    k[d]++;
    k[e]++;
    max=0;
    max2=0;
    str=0;
    straight=0;
    for(int i=1;i<=13;i++){
      if(max<=k[i]){//??°???
	max2=max;
	max=k[i];
      }else if(max2<=k[i])max2=k[i];

      if(k[i]==1){
	str++;
	if(str==5)straight=1;
      }else str=0;
      
    }
    
    if(max==4&&max2==1)cout<<"four card"<<endl;
    else if(max==3&&max2==2)cout<<"full house"<<endl;
    else if(straight==1)cout<<"straight"<<endl;
    else if(k[10]==1&&k[11]==1&&k[12]==1&&k[13]==1&&k[1]==1)cout<<"straight"<<endl;
    else if(max==3&&max2==1)cout<<"three card"<<endl;
    else if(max==2&&max2==2)cout<<"two pair"<<endl;
    else if(max==2&&max2==1)cout<<"one pair"<<endl;
    else cout<<"null"<<endl;
    
							

  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)
#define ll long long
#define EPS 1.0e-8
#define MAX_N 100
typedef pair<int,int> Pii;
typedef pair<int,int> Pis;
const double PI=acos(-1);

bool is_onepair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
	if(count == 1){
		return true;
	}
	
}

bool is_twopair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
		if(count == 2){
			return true;
		}
}

bool is_threecard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 3) return true;
	}
}

bool is_straight(int numbers[], map<int,int> freq, int count){

	if(numbers[0] == 11 || numbers[0] == 12 || numbers[0] == 13) return false;

	if(((numbers[0]+1 == numbers[1]) || (numbers[0]+9 == numbers[1])) && numbers[1] + 1 == numbers[2] && numbers[2] + 1 == numbers[3] && numbers[3] + 1 == numbers[4] ) return true;
	return false;
}

bool is_fullhouse(int numbers[], map<int,int> freq, int count){
	count = 0;
	int cnt1 = 0, cnt2 = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			cnt1++;
		}
		if(freq[i] == 3){
			cnt2++;
		}
	}
		if(cnt1 == 1 && cnt2 == 1){
			return true;
		}
		return false;
}

bool is_fourcard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 4){
			count++;
		}
	}
		if(count == 1){
			return true;
		}
		 return false;
}

int main(){
	int numbers[5];
	map<int,int> freq;
	int count = 0;

	
	while(~scanf("%d,%d,%d,%d,%d",&numbers[0],&numbers[1],&numbers[2],&numbers[3],&numbers[4])){

		sort(numbers,numbers+5);

		if(is_fullhouse(numbers, freq, count)) cout << "full house" << endl;
		else if(is_onepair(numbers, freq, count)) cout << "one pair" << endl;
		else if(is_twopair(numbers, freq, count)) cout << "two pair" << endl;		
		else if(is_threecard(numbers, freq, count)) cout << "three card" << endl;
		else if(is_straight(numbers, freq, count)) cout << "straight" << endl;

		else if(is_fourcard(numbers, freq, count)) cout << "four card" << endl;
		else cout << "null" << endl;
	}
}