using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace pj8 { class Program { static void Main(string[] args) { int[] cards = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray(); Array.Sort(cards); int excard = cards[0]; int fullcheck = cards[0]; int yaku = 0; int Ayaku = 0; String pair = "NO HAND"; bool Acard = false; bool full = true; for(int i = 1;i < cards.Length;i++) { if(cards[i] == excard) { if (Acard == false) { yaku++; } else { Ayaku++; } } else { excard = cards[i]; if(yaku > 0) { Acard = true; } } } switch (yaku) { case 1: pair = "ONE PAIR"; if (Ayaku == 2) { pair = "FULL HOUSE"; } else if (Ayaku == 1) { pair = "TWO PAIR"; } break; case 2: pair = "THREE CARD"; if (Ayaku == 1) { pair = "FULL HOUSE"; } break; } Console.WriteLine(pair); } } }