using System; using System.Collections.Generic; using System.IO; using System.Linq; public class Program { private static readonly string currentPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; private static readonly string testIn = "test_in"; private static readonly string testOut = "test_out"; public static void Main(string[] args) { string result = proc(Console.ReadLine().Split(' ')); Console.WriteLine(result); } private static string proc(string[] args) { List cards = new List(); foreach (string arg in args) { cards.Add(int.Parse(arg)); } List result = Search(cards); string hand = string.Empty; if (result.Contains(3) && result.Contains(2)) { hand = "FULL HOUSE"; } else if (result.Contains(3)) { hand = "THREE CARD"; } else if (result.Count(num => num == 2) == 2) { hand = "TWO PAIR"; } else if (result.Count(num => num == 2) == 1) { hand = "ONE PAIR"; } else { hand = "NO HAND"; } return hand; } private static List Search(List cards) { List result = new List(); for (int i = 1; i <= 13; i++) { int count = 0; foreach (int card in cards) { if (card == i) { count++; } } result.Add(count); } return result; } }