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<vector>
#include<algorithm>

using namespace std;

int main(){

  int num[5];
  char trash;
  vector<int> V;

  while(cin >> num[0] >> trash >> num[1] >> trash >> num[2] >> trash >> num[3] >> trash >> num[4]){
    for(int i = 0; i < 5; i++) V.push_back(num[i]);

    sort(V.begin(), V.end());


    if(V[1] == V[0] && V[2] == V[0] && V[3] == V[0] || V[2] == V[1] && V[3] == V[1] && V[4] == V[1]){
      cout << "four card"<< endl;
    }else if(V[1] == V[0] && V[2] == V[0] && V[3] == V[4] || V[3] == V[2] && V[4] == V[2] && V[1] == V[0]){
      cout << "full house" << endl;
    }else if(V[1] == V[0]+1 && V[2] == V[0]+2 &&V[3] == V[0]+3 && V[4] == V[0]+4 || V[0] == 1 &&  V[1] == 10 && V[2] == 11 && V[3] == 12 && V[4] == 13){
      cout << "straight" << endl;
    }else if(V[1] == V[0] && V[2] == V[0] || V[2] == V[1] && V[3] == V[1] || V[3] == V[2] && V[4] == V[2]){
      cout << "three card" << endl;
    }else if(V[1] == V[0] && V[2] == V[3] || V[2] == V[1] && V[3] == V[4] || V[1] == V[0] && V[3] == V[4]){
      cout << "two pair" << endl;
    }else if(V[1] == V[0] || V[2] == V[1] || V[3] == V[2] || V[4] == V[3]){
      cout << "one pair" << endl;
    }else{
      cout << "null" <<endl;
    }

    V.clear();


  }

  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        vector<int> card(5);
        if(!(cin >> card[0]))
            return 0;

        for(int i=1; i<5; ++i){
            char c;
            cin >> c >> card[i];
        }
        sort(card.begin(), card.end());

        vector<int> num(5, 0);
        for(int i=0; i<5; ++i){
            int j = i+1;
            while(j < 5 && card[j] == card[i])
                ++ j;
            ++ num[j-i];
            i = j-1;
        }

        if(num[4] == 1)
            cout << "four card" << endl;
        else if(num[3] == 1 && num[2] == 1)
            cout << "full house" << endl;
        else if(num[3] == 1)
            cout << "three card" << endl;
        else if(num[2] == 2)
            cout << "two pair" << endl;
        else if(num[2] == 1)
            cout << "one pair" << endl;
        else if(card[0] == 1 && card[1] + 3 == card[4])
            cout << "straight" << endl;
        else if(card[0] + 4 == card[4])
            cout << "straight" << endl;
        else
            cout << "null" << endl;
    }
}

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

int main(){
  int card[15];
  int tmp;
  char komma;
  int i, j;
  int flag, flag2, flag3;

  while(cin>>tmp){
    for(i=0; i<15; i++) card[i]=0;
    card[tmp]++;
    for(i=0; i<4; i++){
      cin>>komma>>tmp;
      card[tmp]++;
    }

    flag=0;
    for(i=0; i<15; i++)
      if(card[i]==4) flag=1;
    if(flag){
      printf("four card\n"); continue;
    }
    flag2=0; flag3=0;
    for(i=0; i<15; i++){
      if(card[i]==3) flag=1;
      else if(flag2 && card[i]==2) flag3=1;
      else if(card[i]==2) flag2=1;
    }
    if(flag && flag2){
      printf("full house\n"); continue;
    } else if(flag){
      printf("three card\n"); continue;
    } else if(flag3){
      printf("two pair\n"); continue;
    } else if(flag2){
      printf("one pair\n"); continue;
    }
    if(card[1]=1) card[14]=1;
    for(i=10; i>0; i--){
      tmp=1;
      for(j=0; j<5; j++){
        tmp*=card[i+j];
      }
      if(tmp==1){
        printf("straight\n"); break;
      }
    }
    if(tmp==1) continue;
    printf("null\n");
  }

  return 0;
}

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

bool isFourCard(int cards[5]){
	bool res = true;

	for (int i = 1; i < 4; i++){
		if (cards[i] != cards[i + 1])res = false;
	}

	if (res)return true;

	res = true;

	for (int i = 0; i < 3; i++){
		if (cards[i] != cards[i + 1])res = false;
	}

	return res;
}

bool isFullHouse(int cards[5]){
	if (cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4])return true;
	if (cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4])return true;

	return false;
}

bool isStraight(int cards[5]){
	bool res = true;

	for (int i = 0; i < 4; i++){
		if (cards[i] + 1 != cards[i + 1])res = false;
	}

	if (cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13)res = true;

	return res;
}


bool isThreeCard(int cards[5]){
	for (int i = 0; i < 3; i++){
		if (cards[i] == cards[i + 1] && cards[i + 1] == cards[i + 2])return true;
	}

	return false;
}

int Pair(int cards[5]){
	int cnt = 0;

	for (int i = 0; i < 4; i++){
		if (cards[i] == cards[i + 1])cnt++;
	}

	return cnt;
}

int main(){

	while (1){
		int cards[5];

		std::cin >> cards[0];
		for (int i = 1; i < 5; i++){
			char a;
			std::cin >> a >> cards[i];
		}

		std::sort(cards, cards + 5);

		if (isFourCard(cards)){
			std::cout << "four card" << std::endl;
			continue;
		}

		if (isFullHouse(cards)){
			std::cout << "full house" << std::endl;
			continue;
		}

		if (isStraight(cards)){
			std::cout << "straight" << std::endl;
			continue;
		}

		if (isThreeCard(cards)){
			std::cout << "three card" << std::endl;
			continue;
		}

		if (Pair(cards) == 2){
			std::cout << "two pair" << std::endl;
			continue;
		}

		if (Pair(cards) == 1){
			std::cout << "one pair" << std::endl;
			continue;
		}

		if (Pair(cards) == 0){
			std::cout << "null" << std::endl;
			continue;
		}
	}
	return 0;
}