結果
| 問題 |
No.2062 Sum of Subset mod 999630629
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:21:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 81,296 KB |
| 最終ジャッジ日時 | 2025-06-12 20:22:17 |
| 合計ジャッジ時間 | 3,476 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 24 |
ソースコード
MOD = 999630629
MOD2 = 998244353
n = int(input())
a = list(map(int, input().split()))
if n == 0:
print(0)
else:
sum_a = sum(a) % MOD
pow2 = pow(2, n-1, MOD)
total = (sum_a * pow2) % MOD
ans = total % MOD2
print(ans)
gew1fw