結果

問題 No.516 赤と青の風船
ユーザー hum_ophum_op
提出日時 2017-10-20 14:17:32
言語 F#
(F# 4.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 10,854 ms
コンパイル使用メモリ 189,292 KB
実行使用メモリ 31,232 KB
最終ジャッジ日時 2024-05-01 07:53:32
合計ジャッジ時間 12,227 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
31,104 KB
testcase_01 AC 60 ms
31,208 KB
testcase_02 AC 60 ms
30,848 KB
testcase_03 AC 59 ms
30,848 KB
testcase_04 AC 59 ms
31,232 KB
testcase_05 AC 60 ms
31,104 KB
testcase_06 AC 59 ms
31,104 KB
testcase_07 AC 60 ms
31,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (250 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 No516 () =
    let rec cnt (i:int) (r:int) =
        if i < 3 then
            if String.Compare("RED", Console.ReadLine(), false) = 0 then
                cnt (i + 1) (r + 1)
            else 
                cnt (i + 1) r
        else 
            r

    if (cnt 0 0) >= 2 then
        printfn "RED"
    else 
        printfn "BLUE"
    ()

No516 ()
0