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++: #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#include <array>

using namespace std;
int a[5] = {};

bool for_card ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
	}
	sort ( d.rbegin () , d.rend () );
	return d[0] == 4;
}

bool fullhouse ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
	}
	sort ( d.rbegin () , d.rend () );
	return d[0] == 3 && d[1] == 2;
}

bool straight ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
		if( d[a[i]] > 1 )return 0;
	}
	int k = 0;
	while( d[k] == 0 )k++;
	if( d[1] && d[10] && d[11] && d[12] && d[13] )return 1;
	for( int i = k; i < k + 5; i++ )
	{
		if( d[i] == 0 )return 0;
	}
	return 1;
}

bool there_card ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
	}
	sort ( d.rbegin () , d.rend () );
	return d[0] == 3;
}

bool two_pair ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
	}
	sort ( d.rbegin () , d.rend () );
	return d[0] == 2 && d[1] == 2;
}

bool one_pair ()
{
	array<int , 14> d{};
	for( size_t i = 0; i < 5; i++ )
	{
		d[a[i]]++;
	}
	sort ( d.rbegin () , d.rend () );
	return d[0] == 2;
}



int main ()
{
	char x;
	while( cin >> a[0] >> x >> a[1] >> x >> a[2] >> x >> a[3] >> x >> a[4] )
	{
		if( for_card () )
		{
			cout << "four card" << endl;
		} else if( fullhouse () )
		{
			cout << "full house" << endl;
		} else if( straight () )
		{
			cout << "straight" << endl;
		} else if( there_card () )
		{
			cout << "three card" << endl;
		} else if( two_pair () )
		{
			cout << "two pair" << endl;
		} else if( one_pair () )
		{
			cout << "one pair" << endl;
		} else
		{
			cout << "null" << endl;
		}
	}
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b,c,d,e;
	while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e)!=EOF)
	{
		int cards[13]={0};
		int dbl=0,thr=0,four=0,straight=0,tmp=0;
		cards[a-1]++; cards[b-1]++; cards[c-1]++; cards[d-1]++; cards[e-1]++;

		for(int i = 0; i < 13; ++i)
		{
			if(cards[i]==2) dbl++;
			else if(cards[i]==3) thr++;
			else if(cards[i]==4) four++;

			if(0<i&&cards[i]==1&&cards[i-1]==1) tmp++;
			straight=max(tmp,straight);
		}

		if(four) cout<<"four card"<<endl;
		else if(thr&&dbl) cout<<"full house"<<endl;
		else if(straight==4||cards[0]==1&&cards[9]==1&&cards[10]==1&&cards[11]==1&&cards[12]==1) cout<<"straight"<<endl;
		else if(thr) cout<<"three card"<<endl;
		else if(dbl==2) cout<<"two pair"<<endl;
		else if(dbl) cout<<"one pair"<<endl;
		else cout<<"null"<<endl;
	}
  return 0;
}

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

int main(){
	int a[5];
	char c;
	while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
		int b[14];
		for(int i=0;i<14;i++) b[i] = 0;
		for(int i=0;i<5;i++) b[a[i]]++;
		int d[5];
		for(int i=0;i<5;i++) d[i] = 0;
		for(int i=0;i<14;i++) d[b[i]]++;
		bool st = false;
		for(int i=1;i<11;i++){
			int z = 1;
			for(int j=i;j<i+5;j++) z *= b[(j-1)%13+1];
			if(z==1) st = true;
		}
		if(d[4]==1) cout << "four card";
		else if(d[3]*d[2]==1) cout << "full house";
		else if(st) cout << "straight";
		else if(d[3]==1) cout << "three card";
		else if(d[2]==2) cout << "two pair";
		else if(d[2]==1) cout << "one pair";
		else cout << "null";
		cout << endl;
	}
}

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 && pair==0 && ans!="three card") ans="one pair",pair++;
		else if(num[i]==2 && pair==1 && ans!="three card") ans="two pair",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";
	if(ans=="null") do{
		int flag=0;
		for(int i=0;i<=9;i++){
			if(flag==0 && num[i]==1) flag=1;
			if(flag==1 && num[i+1]==1&& num[i+2] && num[i+3] && num[i+4]==1) ans="straight";
		};
	}while(0);
	cout << ans << '\n' ;
	};
}