結果
| 問題 |
No.2111 Sum of Diff
|
| コンテスト | |
| ユーザー |
paruf4
|
| 提出日時 | 2022-10-28 23:58:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 183 bytes |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 107,208 KB |
| 最終ジャッジ日時 | 2024-07-06 03:17:07 |
| 合計ジャッジ時間 | 4,328 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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