結果

問題 No.314 ケンケンパ
ユーザー daleksprinterdaleksprinter
提出日時 2018-08-10 03:03:14
言語 Python2
(2.7.18)
結果
AC  
実行時間 344 ms / 1,000 ms
コード長 171 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 7,132 KB
実行使用メモリ 69,892 KB
最終ジャッジ日時 2023-10-24 13:00:02
合計ジャッジ時間 7,935 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 344 ms
69,892 KB
testcase_01 AC 340 ms
69,892 KB
testcase_02 AC 342 ms
69,892 KB
testcase_03 AC 339 ms
69,892 KB
testcase_04 AC 339 ms
69,892 KB
testcase_05 AC 341 ms
69,892 KB
testcase_06 AC 339 ms
69,892 KB
testcase_07 AC 338 ms
69,892 KB
testcase_08 AC 339 ms
69,892 KB
testcase_09 AC 339 ms
69,892 KB
testcase_10 AC 339 ms
69,892 KB
testcase_11 AC 340 ms
69,892 KB
testcase_12 AC 338 ms
69,892 KB
testcase_13 AC 338 ms
69,892 KB
testcase_14 AC 339 ms
69,892 KB
testcase_15 AC 338 ms
69,892 KB
testcase_16 AC 335 ms
69,892 KB
testcase_17 AC 336 ms
69,892 KB
testcase_18 AC 337 ms
69,892 KB
testcase_19 AC 337 ms
69,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

arr = []

arr.append(0)
arr.append(1)
arr.append(2)
arr.append(2)

for i in range(4,10**6+1):
	arr.append((arr[i-2] + arr[i-3])%(10**9+7))

print arr[n] 
0