結果

問題 No.314 ケンケンパ
ユーザー dangodango
提出日時 2023-06-14 21:35:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 141 bytes
コンパイル時間 1,194 ms
コンパイル使用メモリ 86,520 KB
実行使用メモリ 75,492 KB
最終ジャッジ日時 2023-09-05 07:11:09
合計ジャッジ時間 3,593 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
75,492 KB
testcase_01 AC 75 ms
70,912 KB
testcase_02 AC 73 ms
71,012 KB
testcase_03 AC 73 ms
70,948 KB
testcase_04 AC 72 ms
71,032 KB
testcase_05 AC 73 ms
71,056 KB
testcase_06 AC 74 ms
71,020 KB
testcase_07 AC 73 ms
70,820 KB
testcase_08 AC 74 ms
71,152 KB
testcase_09 AC 73 ms
71,012 KB
testcase_10 AC 73 ms
71,060 KB
testcase_11 AC 72 ms
70,940 KB
testcase_12 AC 75 ms
71,144 KB
testcase_13 AC 74 ms
71,072 KB
testcase_14 AC 79 ms
75,456 KB
testcase_15 AC 78 ms
75,436 KB
testcase_16 AC 76 ms
75,288 KB
testcase_17 AC 78 ms
75,464 KB
testcase_18 AC 80 ms
75,380 KB
testcase_19 AC 81 ms
75,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = 1
b = 0
c = 0
M = 10**9 + 7
for i in range(n-1):
    a, b, c = c, a, (a + b) % M
result = (a + b + c) % M
print(result)
0