結果

問題 No.227 簡単ポーカー
ユーザー hum_ophum_op
提出日時 2016-04-15 22:56:45
言語 F#
(F# 4.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 738 bytes
コンパイル時間 8,412 ms
コンパイル使用メモリ 185,428 KB
実行使用メモリ 32,000 KB
最終ジャッジ日時 2024-04-15 02:06:56
合計ジャッジ時間 10,124 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
31,616 KB
testcase_01 AC 59 ms
32,000 KB
testcase_02 AC 60 ms
31,832 KB
testcase_03 AC 60 ms
31,744 KB
testcase_04 AC 58 ms
31,872 KB
testcase_05 AC 61 ms
32,000 KB
testcase_06 AC 60 ms
31,872 KB
testcase_07 AC 61 ms
32,000 KB
testcase_08 AC 61 ms
31,612 KB
testcase_09 AC 61 ms
31,744 KB
testcase_10 AC 60 ms
31,612 KB
testcase_11 AC 61 ms
31,616 KB
testcase_12 AC 60 ms
32,000 KB
testcase_13 AC 62 ms
32,000 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (218 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

let No227 () =
    let A = Array.zeroCreate 13
    let rec res (i:int) (th:int) (tw:int) =
        if i < A.Length then
            if A.[i] = 3 then
                res (i + 1) (th + 1) tw
            elif A.[i] = 2 then
                res (i + 1) th (tw + 1)
            else
                res (i + 1) th tw
        else
            match th, tw with
            | 1, 1 -> printfn "FULL HOUSE"
            | 1, 0 -> printfn "THREE CARD"
            | 0, 2 -> printfn "TWO PAIR"
            | 0, 1 -> printfn "ONE PAIR"
            | _, _ -> printfn "NO HAND"
            ()

    Console.ReadLine().Split(' ')
    |> Array.map Int32.Parse
    |> Array.iter (fun e -> A.[e-1] <- A.[e-1] + 1)
    res 0 0 0
    ()

No227 ()
0