結果

問題 No.44 DPなすごろく
ユーザー かりあげクンかりあげクン
提出日時 2020-08-24 21:33:03
言語 Nim
(2.0.2)
結果
TLE  
実行時間 -
コード長 155 bytes
コンパイル時間 2,991 ms
コンパイル使用メモリ 64,184 KB
実行使用メモリ 9,632 KB
最終ジャッジ日時 2024-04-24 03:51:36
合計ジャッジ時間 10,207 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 295 ms
5,376 KB
testcase_03 AC 18 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 71 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 73 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 5 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 TLE -
testcase_15 AC 8 ms
5,376 KB
testcase_16 AC 8 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 782 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils
var N = stdin.readLine.parseInt
proc fib(n: int): int =
  if n < 2:
    return n
  else:
    return fib(n - 1) + fib(n - 2)

echo(fib(N+1))
0