結果
| 問題 | No.2111 Sum of Diff |
| コンテスト | |
| ユーザー |
paruf4
|
| 提出日時 | 2022-10-28 23:58:41 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 183 bytes |
| 記録 | |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 113,024 KB |
| 最終ジャッジ日時 | 2026-03-27 13:41:16 |
| 合計ジャッジ時間 | 2,654 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 20 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
mod = 998244353
res = 0
for i in range(n):
res += a[i]*(pow(2, n-1-i, mod)-1)
res -= a[i]*(pow(2, i, mod)-1)
print(res)
paruf4