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

int main() {
	int ar[5];
	while (scanf("%d,%d,%d,%d,%d", &ar[0], &ar[1], &ar[2], &ar[3], &ar[4])+1) {
		sort(ar, ar + 5);
		int a = ar[0];
		int b = ar[1];
		int c = ar[2];
		int d = ar[3];
		int e = ar[4];

		if (a == d || b == e) { cout << "four card" << endl; }
		else if (a == c || d == e) { cout << "full house" << endl; }
		else if (a == b || c == e) { cout << "full house" << endl; }
		else if (b - a == 1 && c - b == 1 && d - c == 1 && e - d == 1&&a!=1 ) { cout << "straight" << endl; }
		else if (a == 1 && b == 10 && c == 11 && d == 12 && e == 13) { cout << "straight" << endl; }
		else if (a == c || b == d || c == e) { cout << "three card" << endl; }
		else if (a==b&&c==d) { cout << "two pair" << endl; }
		else if (a == b&&d == e) { cout << "two pair" << endl; }
		else if (b == c&&d == e) { cout << "two pair" << endl; }
		else if (a == b || b == c || c == d || d == e) { cout << "one pair" << endl; }
		else { cout << "null" << endl; }
	}
	return 0;
}

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

using namespace std;

int main(void)
{
	int card[5];
	int c1;
	int c2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		
		c1 = 0;
		c2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				c1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				c2++;
			}
		}
		
		if ((c1 == 1 && c2 == 0) || (c1 == 0 && c2 == 1)){
			printf("one pair\n");
		}
		else if (c1 == 1 && c1 == c2){
			printf("two pair\n");
		}
		else if (c1 + c2 == 3 && c1 != 0 && c2 != 0){
			printf("full house\n");
		}
			
		else if (c1 == 2 || c2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (c1 == 3 || c2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

C++: #include <string>
#include <iostream>
#include <map>

using namespace std;

int main(){
	int hand[5];

	while(~scanf("%d", &hand[0])){
		for(int i = 1; i < 5; i++){
			scanf(",%d", &hand[i]);
		}
		int num[15] = {0};

		for(int i = 0; i < 5; i ++){
			if(hand[i] == 1){
				hand[i] += 13;
			}
			num[hand[i]]++;
		}

		int h[7] = {0};
		string s[] = {"null", "one pair", "two pair", "three card", "straight", "full house", "four card"};
		int seq = 0;

		h[0] = 1;
		for(int i = 2; i < 15; i++){
			if(num[i-1] && num[i]){
				seq++;
			}
			if(num[i] == 2){
				h[1] ++;
			}
			if(num[i] == 3){
				h[3]++;
			}
			if(num[i] == 4){
				h[6]++;
			}
		}
		if(h[1] > 1){
			h[2]++;
		}
		if(h[1] && h[3]){
			h[5]++;
		}
		if(seq == 4){
			h[4]++;
		}

		for(int i = 6; i >= 0; i--){
			if(h[i]){
				cout << s[i] << endl;
				break;
			}
		}
	}


	return 0;
}

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

int main() {
	vector<string> r;
	int n[5];
	while (scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF)
	{
		int two=0,three=0,four=0,straight=0;
		int hand[13]={0};
		for (int i=0; i<5; i++)
			hand[n[i]-1]++;
		for (int i=0; i<13; i++)
		{
			switch(hand[i])
			{
			case 4:
				four++;
				break;
			case 3:
				three++;
				break;
			case 2:
				two++;
				break;
			default:
				break;
			}
		}
		int count=0;
		for (int i=0; i<14; i++)
		{
			if (count>0)
			{
				if (hand[i%13] == 1)
				{
					count++;
				} else {
					count=0;
				}
				if (count == 5)
				{
					straight=1;
					break;
				}
			} else {
				if (hand[i%13] == 1)
				{
					count=1;
				} else if(hand[i%13]!=0) {
					break;
				}
			}
		}
		string handname;
		if (four == 1) {
			handname = "four card";
		} else if (three == 1 && two == 1) {
			handname = "full house";
		} else if (straight == 1) {
			handname = "straight";
		} else if (three == 1) {
			handname = "three card";
		} else if (two == 2) {
			handname = "two pair";
		} else if (two == 1) {
			handname = "one pair";
		} else {
			handname = "null";
		}
		r.push_back(handname);
	}
	for (int i=0; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}