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<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 <iostream>
#include <array>
#include <numeric>
#include <algorithm>
#include <cstdint>

int main()
{
	std::uint16_t num;
	while (std::cin >> num) {
		typedef std::array<std::uint16_t, 13> CardArray;
		CardArray cards;
		cards.fill(0);
		++cards[num - 1];
		for (std::size_t i = 0; i < 4; ++i) {
			char comma;
			std::cin >> comma >> num;
			++cards[num - 1];
		}

		CardArray::iterator i;
		if (std::find(cards.begin(), cards.end(), 4) != cards.end()) {
			std::cout << "four card" << std::endl;
		}
		else if (std::find(cards.begin(), cards.end(), 3) != cards.end()) {
			if (std::find(cards.begin(), cards.end(), 2) != cards.end()) {
				std::cout << "full house" << std::endl;
			}
			else {
				std::cout << "three card" << std::endl;
			}
		}
		else if ((i = std::find(cards.begin(), cards.end(), 2)) != cards.end()) {
			if (std::find(i + 1, cards.end(), 2) != cards.end()) {
				std::cout << "two pair" << std::endl;
			}
			else {
				std::cout << "one pair" << std::endl;
			}
		}
		else {
			if (cards[0] == 1 and std::accumulate(cards.begin() + 9, cards.end(), 0u) == 4u) {
				std::cout << "straight" << std::endl;
			}
			else {
				i = std::find(cards.begin(), cards.end(), 1);
				if (std::accumulate(i, i + 5, 0u) == 5u) {
					std::cout << "straight" << std::endl;
				}
				else {
					std::cout << "null" << std::endl;
				}
			}
		}
	}
	return 0;
}

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

using namespace std;
int main(void)
{
	int card[6];
	char kari;
	while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			if(i!= 4) scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				if(check[i] == 3) three++;
				if(check[i] == 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(pair == 2) printf("two pair\n");
			else if(three == 1) printf("full house\n");
			else printf("one pair\n");
		}
		else if(three == 1) 
		{
			if(pair == 1) printf("full house\n");
			else printf("three card\n");
		}
		else if(four == 1) printf("four card\n");
		else if(st != 1) printf("null\n");
	}
	kitune:;
	return 0;
}

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

using namespace std;

int main()
{
	int hand[5];
	int i, j;
	
	while (scanf("%d", hand) != EOF){
		int straight = 1;
		int pair = 0;
		int three = 0;
		int four = 0;
		
		for (i = 1; i < 5; i++){
			scanf("%*c%d", hand + i);
		}
		sort(hand, hand + 5);
		for (i = 0; i < 4; i++){
			if (hand[i] == hand[i + 1]){
				pair++;
				i++;
			}
		}
		for (i = 0; i < 3; i++){
			if (hand[i] == hand[i + 1] && hand[i] == hand[i + 2]){
				three = 1;
				pair -= 2;
			}
		}
		for (i = 0; i < 2; i++){
			if (hand[i] == hand[i + 1] && hand[i] == hand[i + 2] && hand[i] == hand[i + 3]){
				four = 1;
			}
		}
		for (i = 0; i < 4; i++){
			if (hand[i] != hand[i + 1] - 1){
				straight = 0;
				break;
			}
		}
		if (hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13 && hand[0] == 1){
			straight = 1;
		}
		if (straight == 1){
			puts("straight");
		}
		else if (four == 1){
			puts("four card");
		}
		else if (pair == 1 && three == 1){
			puts("full house");
		}
		else if (three == 1){
			puts("three card");
		}
		else if (pair == 2){
			puts("two pair");
		}
		else if (pair == 1){
			puts("one pair");
		}
		else {
			puts("null");
		}
	}
	
	return 0;
}

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

int main(){
    int tmp[5];
    while(scanf("%d,%d,%d,%d,%d,",&tmp[0],&tmp[1],&tmp[2],&tmp[3],&tmp[4])!= EOF){
    int hand[14]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }
   
    int pair=0,three=0,str=0,four=0;
    for(int i=1; i<14; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str == 5)cout << "straight" << endl;
    else if(three)cout << "three card" << endl;
    else if(pair == 2)cout << "two pair" << endl;
    else if(pair == 1)cout << "one pair" << endl;
    else cout << "null" << endl;
  }
}