結果
| 問題 |
No.314 ケンケンパ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-28 23:37:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 297 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-06-25 17:22:24 |
| 合計ジャッジ時間 | 4,747 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 16 |
ソースコード
def K(N):
if N == 1:
return 1
elif (N == 2) or (N == 3):
return 2
elif N == 4:
return 3
a, b, c = 1, 0, 1
for i in range(N + 1):
a, b, c = b, c, a + b
return c % (10 ** 9 + 7)
if __name__ == '__main__':
N = int(input())
print(K(N))