結果

問題 No.314 ケンケンパ
ユーザー TawaraTawara
提出日時 2015-12-11 18:27:50
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 125 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 819,444 KB
最終ジャッジ日時 2023-10-13 11:14:23
合計ジャッジ時間 5,316 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

p=10**9+7;N=input()-1
d=[0]*4;d[0]=i=1
exec("i+=1;d[i%4]=(d[(i-2)%4]+d[(i-3)%4])%p;"*N)
print(d[(N+1)%4]+d[N%4]+d[(N-1)%4])%p
0