結果

問題 No.314 ケンケンパ
ユーザー TawaraTawara
提出日時 2015-12-11 18:31:37
言語 Python2
(2.7.18)
結果
AC  
実行時間 358 ms / 1,000 ms
コード長 128 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 6,232 KB
最終ジャッジ日時 2023-10-13 11:14:32
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 353 ms
6,100 KB
testcase_01 AC 12 ms
6,104 KB
testcase_02 AC 12 ms
5,916 KB
testcase_03 AC 11 ms
6,024 KB
testcase_04 AC 11 ms
5,932 KB
testcase_05 AC 11 ms
5,992 KB
testcase_06 AC 11 ms
6,232 KB
testcase_07 AC 11 ms
5,928 KB
testcase_08 AC 11 ms
6,160 KB
testcase_09 AC 11 ms
6,108 KB
testcase_10 AC 12 ms
6,076 KB
testcase_11 AC 11 ms
6,164 KB
testcase_12 AC 12 ms
5,988 KB
testcase_13 AC 12 ms
5,992 KB
testcase_14 AC 14 ms
6,032 KB
testcase_15 AC 15 ms
6,024 KB
testcase_16 AC 20 ms
6,116 KB
testcase_17 AC 46 ms
6,012 KB
testcase_18 AC 177 ms
6,028 KB
testcase_19 AC 358 ms
6,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p=10**9+7;N=input()
d=[0]*4;d[0]=1
for i in xrange(2,N+1):d[i%4]=(d[(i-2)%4]+d[(i-3)%4])%p
print(d[N%4]+d[(N-1)%4]+d[(N-2)%4])%p
0