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 <functional>
using namespace std;
bool isstraight(int *n){
	for(int i=0;i<4;i++){
		if(n[i+1] - n[i] != 1){
			if(n[4] == 13 && n[0] == 1 && n[1] == 10 && n[2] == 11 && n[3] == 12){
				return true;
			}
			return false;
		}
	}
	return true;
}

int main(){
	int card[5];
	char tmp[4];
	while(cin >> card[0] >> tmp[0] >> card[1] >> tmp[1] >> card[2] >> tmp[2] >> card[3] >> tmp[3] >> card[4]){
		int n[14] = {0};
		for(int i=0;i<5;i++){
			n[card[i]]++;
		}
		sort(n,n+14,greater<int>());
		sort(card,card+5);
		if(isstraight(card)){
			cout << "straight" << endl;
		}
		else{
			if(n[0] == 4){
				cout << "four card" << endl;
			}
			else if(n[0] == 3){
				if(n[1] == 2){
					cout << "full house" << endl;
				}
				else{
					cout << "three card" << endl;
				}
			}
			else if(n[0] == 2){
				if(n[1] == 2){
					cout << "two pair" << endl;
				}
				else {
					cout << "one pair" << endl;
				}
			}
			else cout << "null" << endl;
		}
	}
	return 0;
}

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

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}



	for(int i=0;i<13;++i){

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5)
		return 5;

	return 1;
}

void toint(string s, int cards[5]){

	int m=0;


	for(int i=0;i<5;++i){
		int n=0;

		if(s[m]==',' || s[m]=='\0'){
			cards[i] = n;
			++m;
			continue;
		}

		n += n*10 + s[m]-'0';
		++m;
		--n;
	}
}

int main(){

	string s, res;
	int card[5] = {1,2,3,4,5};
	

	cin >> s;

	toint(s,card);

	switch( Result(card) ){
		case 1:res="null";break;
		case 2:res="one pair";break;
		case 3:res="two pair";break;
		case 4:res="three card";break;
		case 5:res="straight";break;
		case 6:res="full house";break;
		case 7:res="four card";break;
	}

	

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main( void )
{
	string in;
	while ( cin >> in )
	{
		replace( in.begin(), in.end(), ',', ' ' );
		istringstream is( in );
		vector <int> hands(5);
		for ( int i = 0; i < 5; i++ )
		{
			is >> hands[i];
		}

		sort( hands.begin(), hands.end() );

		bool straight = true;
		for ( int i = 0 ; straight && i < 4; i++ )
		{
			if ( i == 0 && hands[i] == 1 )
				continue;
			if ( hands[i+1] - hands[i] != 1 )
			{
				straight = false;
			}
		}

		if ( straight )
		{
			cout << "straight" << endl;
		}
		else
		{
			vector <int> cnt( 14, 0 );
			for ( int i = 0; i < 5; i++ )
			{
				cnt[ hands[i] ] ++;
			}

			sort( cnt.rbegin(), cnt.rend() );

			if ( cnt[0] == 4 )
			{
				cout << "four card" << endl;
			}
			else if ( cnt[0] == 3 && cnt[1] == 2 )
			{
				cout << "full house" << endl;
			}
			else if ( cnt[0] == 3 )
			{
				cout << "three card" << endl;
			}
			else if ( cnt[0] == 2 && cnt[1] == 2 )
			{
				cout << "two pair" << endl;
			}
			else if ( cnt[0] == 2 )
			{
				cout << "one pair" << endl;
			}
			else
			{
				cout << "null" << endl;
			}

		}

	}
}

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

using namespace std;

int main() {

	int ans, h[5];

	while(1) {
		ans=0;
		for(int i=0; i<5; i++) {
			cin >> h[i];
		}
		sort(h, h+5);
		for(int i=0; i<4; i++) {
			for(int j=i+1; j<5; j++) {
				if(h[i]==h[j])
					ans++;
			}
		}
		if(h[4]==h[3]+1&&h[3]==h[2]+1&&h[2]==h[1]+1&&h[1]==h[0]+1) {
			ans=5;
		}
		if(h[0]==1&&h[4]==13&&h[3]==12&&h[2]==11&&h[1]==10) {
			ans=5;
		}
		switch(ans) {
			case 0:
				cout << "null" << endl;
				break;
			case 1:
				cout << "one pair" << endl;
				break;
			case 2:
				cout << "two pair" << endl;
				break;
			case 3:
				cout << "three cards" << endl;
				break;
			case 5:
				cout << "straight" << endl;
				break;
			case 4:
				cout << "full house" << endl;
				break;
			case 6:
				cout << "four cards" << endl;
				break;
			case 10:
				cout << "four cards" << endl;
				break;
		}
	}

	return 0;

}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	vector<int> c(5);
	char a;
	while(cin >> c[0] >> a >> c[1] >> a >> c[2] >> a >> c[3] >> a >> c[4]){
		bool yaku=false;
		int cnt[5]={0};
		sort(c.begin(),c.end());
		if((c[0]==(c[1]-1) && c[0]==(c[2]-2) && c[0]==(c[3]-3) && c[0]==(c[4]-4)) || (c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13)) {cout << "straight" << endl ; continue;} 
		for(int i=0;i<5;++i){
			for(int j=i+1;j<5;++j){
				if(c[i]==c[j] && c[i]!=-1) cnt[i]++, c[j]=-1; 
			}
		}
		for(int i=0;i<5;++i){
			
			if(cnt[i]==3) {cout << "four card" << endl;yaku=true; break;}
			if(cnt[i]==2) {
				if(cnt[3]==1) {cout << "full house" << endl; yaku=true; break;}
				else {cout << "three card" << endl ; yaku=true; break;}
			}
			if(cnt[i]==1) {
				if(cnt[2]==2) {cout << "full house" << endl;  yaku=true; break;}
				else if (cnt[i+2]==1) {cout << "two pair" << endl; yaku=true; break;}
				else {cout << "one pair" << endl;yaku=true;  break;} 
			}
		}
		if(!yaku){
			cout << "null" << endl;
		}
		
	}
	return 0; 
}