結果

問題 No.51 やる気の問題
ユーザー hum_ophum_op
提出日時 2016-04-04 13:04:21
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 342 bytes
コンパイル時間 18,596 ms
コンパイル使用メモリ 184,192 KB
実行使用メモリ 42,340 KB
最終ジャッジ日時 2024-04-10 11:11:09
合計ジャッジ時間 18,648 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 315 ms
34,728 KB
testcase_01 AC 317 ms
34,340 KB
testcase_02 AC 306 ms
34,348 KB
testcase_03 AC 312 ms
34,476 KB
testcase_04 AC 319 ms
34,472 KB
testcase_05 RE -
testcase_06 AC 312 ms
34,524 KB
testcase_07 AC 310 ms
34,520 KB
testcase_08 AC 314 ms
34,672 KB
testcase_09 RE -
testcase_10 AC 317 ms
34,788 KB
testcase_11 AC 326 ms
34,916 KB
testcase_12 AC 323 ms
34,672 KB
testcase_13 AC 325 ms
34,788 KB
testcase_14 AC 316 ms
34,540 KB
testcase_15 RE -
testcase_16 AC 325 ms
34,656 KB
testcase_17 AC 321 ms
34,736 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 315 ms
34,600 KB
testcase_21 AC 313 ms
34,332 KB
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (378 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 No68 () =
    let W = int <| Console.ReadLine()
    let D = int <| Console.ReadLine()

    let rec yaruki (W:int) (D:int) =
        // printfn "%d %d" W D  // debug
        if D = 1 then
            W
        else
            let y = W / (D * D)
            yaruki (W-y) (D - 1)

    printfn "%d" (yaruki W D)
    ()

No68 ()
0