結果

問題 No.314 ケンケンパ
ユーザー DexctersuDexctersu
提出日時 2017-12-22 00:56:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 118 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 47,088 KB
最終ジャッジ日時 2023-08-22 11:27:13
合計ジャッジ時間 3,164 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 372 ms
46,636 KB
testcase_01 AC 16 ms
7,780 KB
testcase_02 AC 15 ms
7,784 KB
testcase_03 AC 15 ms
7,920 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 15 ms
7,780 KB
testcase_07 AC 16 ms
7,820 KB
testcase_08 AC 15 ms
7,792 KB
testcase_09 AC 16 ms
7,920 KB
testcase_10 AC 15 ms
7,816 KB
testcase_11 AC 15 ms
7,816 KB
testcase_12 AC 16 ms
7,812 KB
testcase_13 AC 15 ms
7,736 KB
testcase_14 AC 17 ms
8,228 KB
testcase_15 AC 19 ms
8,212 KB
testcase_16 AC 25 ms
9,116 KB
testcase_17 AC 53 ms
11,988 KB
testcase_18 AC 189 ms
26,712 KB
testcase_19 AC 385 ms
47,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
k=[0]*n
k[0]=1
k[1]=2
k[2]=2
mod=10**9+7
for i in range(3,n):
    k[i]=(k[i-2]+k[i-3])%mod
print(k[-1])
0