結果
問題 |
No.2062 Sum of Subset mod 999630629
|
ユーザー |
![]() |
提出日時 | 2025-04-15 23:33:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,604 KB |
実行使用メモリ | 81,504 KB |
最終ジャッジ日時 | 2025-04-15 23:34:57 |
合計ジャッジ時間 | 2,692 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 19 |
ソースコード
MOD = 998244353 M = 999630629 n = int(input()) a = list(map(int, input().split())) sum_a = sum(a) if sum_a < M: power = pow(2, n-1, MOD) ans = (sum_a % MOD) * power % MOD print(ans) else: # This part is not handled in the solution but is required for completeness pass