結果

問題 No.1310 量子アニーリング
ユーザー H3PO4H3PO4
提出日時 2020-12-07 09:57:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-17 13:39:13
合計ジャッジ時間 6,170 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
MOD = 998244353
comb = 1
ans = 0
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)
0