結果
| 問題 | No.554 recurrence formula |
| コンテスト | |
| ユーザー |
URechaRecha
|
| 提出日時 | 2019-09-06 09:16:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 32,288 KB |
| 最終ジャッジ日時 | 2024-06-23 14:40:58 |
| 合計ジャッジ時間 | 4,281 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 TLE * 1 -- * 9 |
ソースコード
def main():
n= int(input())
dp=[[2],[1]]
for i in range(3,n+1,2):
dp[1].append(i * (sum(dp[0])))
dp[0].append((i+1) * (sum(dp[1])))
if n%2 == 0:
num = dp[0][-1]
else:
num = dp[1][-1]
print(num%(10**9+7))
main()
URechaRecha