結果
| 問題 |
No.2062 Sum of Subset mod 999630629
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 23:33:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 232 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 82,096 KB |
| 実行使用メモリ | 81,032 KB |
| 最終ジャッジ日時 | 2025-04-15 23:34:51 |
| 合計ジャッジ時間 | 3,164 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 24 |
ソースコード
MOD1 = 999630629
MOD2 = 998244353
N = int(input())
A = list(map(int, input().split()))
sum_a = sum(A)
if N == 0:
print(0)
else:
exponent = pow(2, N-1, MOD1)
temp = (sum_a % MOD1) * exponent % MOD1
print(temp % MOD2)
lam6er