open System.Collections.Generic open System.Linq let getArgs = let args = System.Console.ReadLine().Split( ' ' ):string[] seq { for str in args do yield int( str ) } let Rank lt = let dict = new Dictionary() for i in lt do match (dict.ContainsKey i) with | false -> dict.Add( i , 1) | true -> dict.Item i <- (dict.Item i + 1) let dictv = dict.Values.OrderByDescending(fun x -> x).ToArray() match dict.Keys.Count with | 0 -> printfn "NO HAND" | 1 -> printfn "NO HAND" | _ -> match ( (Array.item 0 dictv) , (Array.item 1 dictv) ) with | 3, 2 -> printfn "FULL HOUSE" | 3, _ -> printfn "THREE CARD" | 2, 2 -> printfn "TWO PAIR" | 2, _ -> printfn "ONE PAIR" | _, _ -> printfn "NO HAND" Rank getArgs