結果

問題 No.786 京都大学の過去問
ユーザー teru99teru99
提出日時 2019-07-18 13:49:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 7,920 KB
最終ジャッジ日時 2023-08-26 18:38:33
合計ジャッジ時間 918 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,920 KB
testcase_01 AC 14 ms
7,832 KB
testcase_02 AC 13 ms
7,808 KB
testcase_03 AC 14 ms
7,828 KB
testcase_04 AC 14 ms
7,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8

n = int(input())

step = []

step.append(1)
step.append(2)
step.append(3)

for i in range(3,n+1):
    step.append(step[i-2]+step[i-1])

print(step[n-1])
0