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<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_fourcard(numbers, freq, count)) cout << "four card" << 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 cout << "null" << endl;
	}
}

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

int main(){
  vector<int> c(5);
  int ans;
  while(~scanf("%d,%d,%d,%d,%d", &c[0],&c[1],&c[2],&c[3],&c[4])) {
    sort(c.begin(), c.begin()+5);
    if(c[0] == c[3] || c[1] == c[4]) ans = 7;
    else if((c[0] == c[2] && c[3] == c[4])|| (c[0] == c[1] && c[2] == c[4])) ans = 6;
    else if(c[0] + 1 == c[1] && c[1] + 1 == c[2] && c[2] + 1 == c[3] && c[3] +1 == c[4])
      ans = 5;
    else if(c[0] == 1 && c[1] == 10 && c[2] == 11 && c[3] == 12 && c[4] == 13)
      ans = 5;
    else if(c[0] == c[2] || c[1] == c[3] || c[2] == c[4])
      ans = 4;
    else if((c[0] == c[1] && c[2] == c[3]) || (c[0] == c[1] && c[3] == c[4]) || (c[1] == c[2] && c[3] == c[4]))
      ans = 3;
    else if(c[0] == c[1] || c[1] == c[2] || c[2] == c[3] || c[3] == c[4])
      ans = 2;
    else ans= 1;
    switch(ans) {
    case 1: cout << "null" << endl; break;
    case 2: cout << "one pair" << endl; break;
    case 3: cout << "two pair" << endl; break;
    case 4: cout << "three card" << endl; break;
    case 5: cout << "straight" << endl; break;
    case 6: cout << "full house" << endl; break;
    case 7: cout << "four card" << endl; break;
    }
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
main(){
  int a[5];
  while(~scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
    int card[14]={};
    int p=1;
    int pan=0;
    int tpan=0;
    for(int i=0;i<5;i++){
      card[a[i]]++;
      if(card[a[i]]>3) p=7;
      else if(card[a[i]]>2){
	tpan++;
	pan--;
      }
      else if(card[a[i]]>1){
	pan++;
      }
    }
    if(p==7) puts("four card");
    else if(tpan==1 && pan==1) puts("full house");
    else if(tpan==1) puts("three card");
    else if(pan==2) puts("two pair");
    else if(pan==1) puts("one pair");
    else{
      bool f=false;
      for(int i=0;i<10;i++){
	for(int j=0;j<5;j++){
	  int ind = (i+j)%14+1;
	  if(!card[ind]) break;
	  if(j==4) f=true;
	}
	if(f) break;
      }
      if(f) puts("straight");
      else
	puts("null");
    }
    
  }
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int card[5]; char ch;
	while(cin>>card[0]>>ch>>card[1]>>ch>>card[2]>>ch>>card[3]>>ch>>card[4]){
	int num[13]={0};
	for(int i=0;i<5;i++) num[card[i]-1]++;
	string ans="null";
	int pair=0;
	for(int i=0;i<13;i++){
		if(num[i]==2 && ans!="three card") pair++;
		else if(num[i]==3) ans="three card";
		else if(num[i]==4) ans="four card";
	};
	
	if(ans=="three card" && pair==1) ans="full house";
	else if(pair==1) ans="one pair";
	else if(pair==2) ans="two pair";
	else if(ans=="null") do{
		for(int i=0;i<9;i++){
			if(num[i]==1 &&num[i+1]==1&& num[i+2]==1 && num[i+3]==1 && num[i+4]==1) ans="straight";
		};
		if(num[9]==1&&num[10]==1&&num[11]==1&&num[12]==1&&num[0]==1) ans="straight";
	}while(0);
	cout << ans << '\n' ;
	};
}