結果
| 問題 |
No.1325 Subsequence Score
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-12 17:47:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 896 ms / 2,000 ms |
| コード長 | 213 bytes |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 81,840 KB |
| 実行使用メモリ | 172,852 KB |
| 最終ジャッジ日時 | 2024-09-17 01:29:11 |
| 合計ジャッジ時間 | 13,266 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
N = int(input())
a = list(map(int,input().split()))
ans = 0
P = 998244353
for i in range(N):
i += 1
tmp = pow(2,N-i,P) * (pow(2,i-1,P)+(i-1)*pow(2,i-2,P))%P
ans += a[i-1] * tmp
ans %= P
print(ans)