結果

問題 No.227 簡単ポーカー
ユーザー kuuso1kuuso1
提出日時 2016-08-18 17:29:08
言語 F#
(F# 4.0)
結果
AC  
実行時間 85 ms / 5,000 ms
コード長 634 bytes
コンパイル時間 7,081 ms
コンパイル使用メモリ 190,720 KB
実行使用メモリ 31,848 KB
最終ジャッジ日時 2024-04-25 08:56:51
合計ジャッジ時間 8,055 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
31,488 KB
testcase_01 AC 75 ms
31,848 KB
testcase_02 AC 85 ms
31,232 KB
testcase_03 AC 79 ms
31,744 KB
testcase_04 AC 74 ms
31,744 KB
testcase_05 AC 74 ms
31,744 KB
testcase_06 AC 73 ms
31,488 KB
testcase_07 AC 78 ms
31,616 KB
testcase_08 AC 73 ms
31,616 KB
testcase_09 AC 74 ms
31,616 KB
testcase_10 AC 74 ms
31,744 KB
testcase_11 AC 71 ms
31,616 KB
testcase_12 AC 74 ms
31,360 KB
testcase_13 AC 72 ms
31,616 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (240 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let As = stdin.ReadLine().Split() |> Array.map int
        
        let hs = As |> Seq.countBy (fun e -> e) |> Seq.sortWith (fun p q -> (snd p).CompareTo(snd q)) |> Seq.rev |> Seq.toArray
        
        let judgeHands (ha: (int*int) array) =
            match (Array.length ha) with
            | 4 -> "ONE PAIR"
            | 2 -> if (snd ha.[0]) = 3 then "FULL HOUSE" else "NO HAND"
            | 3 -> if (snd ha.[0]) = 3 then "THREE CARD" else "TWO PAIR"
            | _ -> "NO HAND"

        judgeHands hs |> printfn "%s"
        

let mySol = new Sol()
mySol.Solve()
0