using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main(String[] args) { List cards = new List(); foreach (string arg in args) { cards.Add(int.Parse(arg)); } List result = Search(cards); if (result.Count(num => num == 3) == 1 && result.Contains(2)) { Console.WriteLine("FULL HOUSE"); } else if (result.Count(num => num >= 3) == 1) { Console.WriteLine("THREE CARD"); } else if (result.Count(num => num == 2) == 2) { Console.WriteLine("TWO PAIR"); } else if (result.Count(num => num == 2) == 1) { Console.WriteLine("ONE PAIR"); } else { Console.WriteLine("NO 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; } }