結果
| 問題 | No.314 ケンケンパ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-04 16:55:26 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 249 bytes |
| 記録 | |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 22,868 KB |
| 最終ジャッジ日時 | 2026-05-10 19:42:29 |
| 合計ジャッジ時間 | 5,611 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 1 |
| other | WA * 15 RE * 2 |
ソースコード
import array
module=10**9+7
if __name__=="__main__":
n=int(input())
dp=array.array("Q",[1,2,2]) # テーブル、効率化のためにarrayを用いる
for i in range(3,n):
dp.append((dp[i-2]+dp[i-3])%module)
print(dp[i-1])