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<stdio.h>
#include<algorithm>

int main(){
	int a[5];
	while(~scanf("%d,%d,%d,%d,%d",a,a+1,a+2,a+3,a+4)){
		std::sort(a,a+5);
		if((a[0]==a[1])&&(a[2]==a[3])&&(a[2]==a[1]))printf("four card\n");
		else if((a[1]==a[2])&&(a[3]==a[4])&&(a[3]==a[2]))printf("four card\n");
		else if((a[0]==a[1])&&(a[1]==a[2])&&(a[3]==a[4]))printf("full house\n");
		else if((a[0]==a[1])&&(a[2]==a[3])&&(a[3]==a[4]))printf("full house\n");
		else if((a[0]==1)&&(a[1]==10)&&(a[2]==11)&&(a[3]==12)&&(a[4]==13))printf("straight\n");
		else if((a[0]+1==a[1])&&(a[1]+1==a[2])&&(a[2]+1==a[3])&&(a[3]+1==a[4]))printf("straight\n");
		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])))printf("three card\n");
		else if(
			((a[0]==a[1])&&((a[2]==a[3])||(a[3]==a[4])))||
			((a[1]==a[2])&&(a[3]==a[4])))printf("two pair\n");
		else if((a[0]==a[1])||(a[1]==a[2])||(a[2]==a[3])||(a[3]==a[4]))printf("one pair\n");
		else printf("null\n");
	}
}

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

int main(){
int n[6];
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;cc=0;}
}

for(int i=0;i<3;i++){
if(n[i+1]!=(n[i]+1)f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc=1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");

c=0,cc=0;
}
return 0;
}

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[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>
#include <string>
using namespace std;

int str(int a[5], int n){
	int tmp = a[n], i;
	for(i = 0;i < 4 && ++tmp == a[++n];i++){if(tmp == 13 && i == 2)tmp = 0;}
	//cout << endl;
	if(i == 4)return 1;
	else return 0;
}

int main(){
	string s[]={"one pair","two pair","three card","straight","full house","four card","null"};
	int a[5], t[13], ans;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		ans = -1;
		sort(a, a+5);
		for(int i = 0;i < 13;i++)t[i] = count(a, a+5,i+1);
		
		for(int i = 0;i < 13;i++){
			if(t[i] == 3)ans = 2;
			if(ans == 0 && t[i] == 2)ans = 1;
			if(ans == -1 && t[i] == 2)ans = 0;
		}
		//for(int i = 0;i < 5;i++)cout << a[i] << " ";
		if(str(a, 0) || str(a, 1))ans = 3;
		int th = 0, tw = 0, fo = 0;
		for(int i = 0;i < 13;i++){
			if(t[i] == 2)tw = 1;
			if(t[i] == 3)th = 1;
			if(t[i] == 4)fo = 1;
		}
		if(tw && th)ans = 4;
		if(fo)ans = 5;
		if(ans == -1)ans = 6;
		//for(int i = 0;i < 5;i++)printf("%d ", a[i]);
		//for(int i = 0;i < 13;i++)cout << t[i] << " ";
		//cout << "fo" << fo;
		//cout << endl;
		//cout << ans;
		cout << s[ans] << endl;
	}
	return 0;
}

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

int main(){
    int tmp[5];
    char com;
    while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
    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;
  }
    
}