結果
| 問題 |
No.1310 量子アニーリング
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-07 10:07:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 238 bytes |
| コンパイル時間 | 132 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-17 13:39:17 |
| 合計ジャッジ時間 | 4,096 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 RE * 8 |
ソースコード
N = int(input())
MOD = 998244353
comb = 1
ans = 0
# 偶数で落ちた?
assert N % 2
for i in range(N + 1):
ans += comb * pow(2, abs(N - 2 * i), MOD)
ans %= MOD
comb = comb * (N - i) * pow(i + 1, -1, MOD) % MOD
print(ans)