結果
| 問題 | No.314 ケンケンパ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-04 16:55:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 249 bytes |
| 記録 | |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,688 KB |
| 最終ジャッジ日時 | 2024-11-15 20:14:05 |
| 合計ジャッジ時間 | 3,288 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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])