結果

問題 No.44 DPなすごろく
ユーザー kou_kkk
提出日時 2025-02-12 12:31:21
言語 Nim
(2.2.12 + ACL)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
+ 330µs
コード長 131 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,550 ms
コンパイル使用メモリ 69,816 KB
実行使用メモリ 9,900 KB
最終ジャッジ日時 2026-10-11 08:34:11
合計ジャッジ時間 4,225 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import strutils

let
  n = parseInt stdin.readLine
var
  a, b = 1
  cnt = 1

while cnt < n:
  (a, b) = (b, a + b)
  inc cnt

echo b
0