結果
| 問題 | No.554 recurrence formula |
| コンテスト | |
| ユーザー |
URechaRecha
|
| 提出日時 | 2019-09-06 09:16:45 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 508 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 42,460 KB |
| 最終ジャッジ日時 | 2026-03-08 10:32:21 |
| 合計ジャッジ時間 | 32,135 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 TLE * 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