結果

問題 No.44 DPなすごろく
ユーザー natoriusannatoriusan
提出日時 2023-07-30 22:26:41
言語 F#
(F# 4.0)
結果
AC  
実行時間 336 ms / 5,000 ms
コード長 192 bytes
コンパイル時間 6,397 ms
コンパイル使用メモリ 184,264 KB
実行使用メモリ 34,732 KB
最終ジャッジ日時 2024-04-17 23:40:27
合計ジャッジ時間 15,474 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 336 ms
34,328 KB
testcase_01 AC 329 ms
34,184 KB
testcase_02 AC 329 ms
34,348 KB
testcase_03 AC 332 ms
34,052 KB
testcase_04 AC 333 ms
33,912 KB
testcase_05 AC 329 ms
33,672 KB
testcase_06 AC 326 ms
34,180 KB
testcase_07 AC 327 ms
34,340 KB
testcase_08 AC 327 ms
34,336 KB
testcase_09 AC 334 ms
34,476 KB
testcase_10 AC 332 ms
34,324 KB
testcase_11 AC 332 ms
34,428 KB
testcase_12 AC 333 ms
34,464 KB
testcase_13 AC 334 ms
34,172 KB
testcase_14 AC 331 ms
34,720 KB
testcase_15 AC 330 ms
34,476 KB
testcase_16 AC 329 ms
34,440 KB
testcase_17 AC 333 ms
33,796 KB
testcase_18 AC 334 ms
34,728 KB
testcase_19 AC 332 ms
34,732 KB
testcase_20 AC 334 ms
34,184 KB
testcase_21 AC 332 ms
34,460 KB
testcase_22 AC 331 ms
34,344 KB
testcase_23 AC 332 ms
34,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (222 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 #

let n = stdin.ReadLine () |> int

let rec next prev1 prev2 count =
    if count = 0 then
        prev2
    else
        next prev2 (prev1+prev2) (count-1)
        
next 0L 1L n |> printfn "%d"
0