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;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(1){
		int card[20] = {}; // A ~ 13
		int data[10] = {};

		char c0;
		for(int i = 0; i < 5; ++i){
			if(i != 0) cin >> c0;
			cin >> data[i];
			++card[data[i] - 1];
		}

		if(cin.eof()) break;

		sort(card, card + 13, greater<int>());
		/*
		for(int i = 0; i < 13; ++i){
			cout << card[i] << " ";
		}
		cout << endl;
		*/
		switch(card[0]){
			case 4 :
				cout << "four card" << endl;
				break;

			case 3 :
				if(card[1] == 2)
					cout << "full house" << endl;
				else
					cout << "three card" << endl;
				break;

			case 2 :
				if(card[1] == 2)
					cout << "two pair" << endl;
				else
					cout << "one pair" << endl;
				break;

			default :
				sort(data, data + 5);
				bool check = true;
				if(data[4] == 13) data[0] = 9;
				for(int i = 0; i < 5; ++i){
					if(data[0] + i != data[i]){
						check = false;
						break;
					}
				}
				if(check)
					cout << "straight" << endl;
				else
					cout << "null" << endl;
				break;
		}
	}
	return 0;
}

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

using namespace std;

int main() {
  char *line = nullptr;
  size_t buffer_size;
  while (getline(&line, &buffer_size, stdin) > 0) {
    int cards[5];
    sscanf(
        line, "%d,%d,%d,%d,%d",
        cards, cards + 1, cards + 2, cards + 3, cards + 4);
    sort(cards, cards + 5);
    int counts[14] = {};
    for (auto card : cards) { ++counts[card]; }

    int pairs[2] = {};
    int three_card = 0, four_card = 0;
    for (int card = 1; card <= 13; ++card) {
      switch (counts[card]) {
        case 2:
          pairs[pairs[0] ? 1 : 0] = card;
          break;
        case 3:
          three_card = card;
          break;
        case 4:
          four_card = card;
          break;
        default:
          break;
      }
    }

    bool trivial_straight = true;
    for (int i = 0, head = cards[0]; i < 5; ++i) {
      if (cards[i] != head + i) {
        trivial_straight = false;
        break;
      }
    }
    bool straight_with_tailing_ace = cards[0] == 1;
    for (int i = 1; i < 5; ++i) {
      if (cards[i] != 10 - 1 + i) {
        straight_with_tailing_ace = false;
        break;
      }
    }
    bool straight = trivial_straight or straight_with_tailing_ace;

    int num_pairs = (pairs[0] ? 1 : 0) + (pairs[1] ? 1 : 0);

    const char *character = "null";
    if (four_card) { character = "four card"; }
    else if (three_card and num_pairs == 1) { character = "full house"; }
    else if (straight) { character = "straight"; }
    else if (three_card) { character = "three card"; }
    else if (num_pairs == 2) { character = "two pair"; }
    else if (num_pairs == 1) { character = "one pair"; }
    puts(character);
  }
  free(line);

  return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main()
{
  vector<int> poker;
  int check[15] = {0};
  int two = 0; int three = 0; int four = 0;
  int ans = 0;

  string trump;
  getline(cin,trump));

  int a = 0;
  int b = 0;

  for(char e : trump){
    if(e == 49){
      if(b == 0){
        b = 1;
      }
      else{
        a = (e - 48) + 10;
        poker.push_back(a);
        b = 0;
      }
    }
    else if(48 <= e && 57 >= e && e != 49){
      if(b == 1){
        a = (e - 48) + 10;
        b = 0;
      }
      else{
        a = e - 48;
      }
      poker.push_back(a);
    }
    else{
      if(b == 1){
        poker.push_back(b);
        b = 0;
      }
    }
  }
  
  if(b == 1){
    poker.push_back(b);
  }

  for(int e : poker){
    ++check[e];
  }

  check[14] = check[1];

  for(int i = 1;i < 14;++i){
    if(check[i] == 4){
      ++four;
    }
    else if(check[i] == 3){
      ++three;
    }
    else if(check[i] == 2){
      ++two;
    }
  }

  if(four == 1){
    cout<<"four card"<<endl;
    ans = 1;
  }
  else if(three == 1){
    ans = 1;
    if(two == 1){
      cout<<"full house"<<endl;
    }
    else{
      cout<<"three card"<<endl;
    }
  }
  else if(two == 2){
    ans = 1;
    cout<<"two pair"<<endl;
  }
  else if(two == 1){
    ans = 1;
    cout<<"one pair"<<endl;
  }
  else{
    for(int i = 1;i < 11;++i){
      if(check[i] == check[i+1] && check[i] == check[i+2] && check[i] == check[i+3] && check[i] == check[i+4] && check[i] != 0){
        cout<<"straight"<<endl;
        ans = 1;
        break;
      }
    }
  }

  if(ans == 0){
    cout<<"null"<<endl;
  }
  }

  return 0;
}

C++: #include <stdio.h>
#include <algorithm>

using namespace std;

int main(void)
{
	char c[5];
	int i, j;
	int sum[14];
	int max, max2;
	
	while (scanf("%d, %d, %d, %d, %d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF){
		
		for (i = 0; i < 14; i++){
			sum[i] = 0;
		}
		
		
		for (i = 0; i < 5; i++){
			sum[c[i]-1]++;
		}
		
		max = 0;
		max2 = 0;
		
		for (i = 0; i < 14; i++){
			if (max < sum[i]){
				max = sum[i];
			}
			else if (max2 < sum[i]){
				max2 = sum[i];
			}
		}
		
		int ch;
		
		for (i = 0; i < 10; i++){
			
			ch = 0;
			
			for (j = 0; j < 5; j++){
				
				if (sum[(i + j) % 13] == 1){
					ch++;
				}
			}
			if (ch == 5){
				break;
			}
		}
		
		if (max == 4){
			printf("four card\n");
		}
		else if (max == 3 && max2 == 2){
			printf("full house\n");
		}
		
		
		else if (ch == 5){
			printf("straight\n");
		}
		
		else if (max == 3){
			printf("three card\n");
		}
		else if (max == 2 && max2 == 2){
			printf("two pair\n");
		}
		else if (max == 2){
			printf("one pair\n");
		}
		else {
			printf("null\n");
		}
	}
	return (0);
}

C++: #include<iostream>
using namespace std;
int main(){
char a[][11]={"null","one pair","two pair","three card","straight","full house","four card"};
long i,h,f,hh[14];
char c;
while(cin>>h){
for(i=0;i<13;i++)hh[i]=0;
hh[h-1]++;
for(i=1;i<5;i++){cin>>c>>h;hh[h-1]++;}
f=0;
for(i=0;i<13;i++){
if(hh[i]==4){
f=6;
}else if(hh[i]==3){
if(f==1)f=5;else f=3;
}else if(hh[i]==2){
if(f==3)f=5;
else if(f==1)f=2;
else f=1;
}
}
if(f==0){
  for(i=0;i<13;i++)if(hh[i]==1)break;
  if(i<9){
  if(hh[i+1]==1)
  if(hh[i+2]==1)
  if(hh[i+3]==1)
  if(hh[i+4]==1)f=4;
  }
  if(i==0){
  if(hh[i+9]==1)
  if(hh[i+10]==1)
  if(hh[i+11]==1)
  if(hh[i+12]==1)f=4;
  }
}
cout<<a[f]<<endl;
}
return 0;
}