結果
| 問題 | No.1325 Subsequence Score |
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2020-12-22 02:52:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 66,296 KB |
| 最終ジャッジ日時 | 2024-09-21 13:40:53 |
| 合計ジャッジ時間 | 7,055 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
mod = 998244353
if N == 1:
print(A[0])
exit()
ans = 0
cnt = pow(2, N - 1, mod)
d = pow(2, N - 2, mod)
for a in A:
ans += a * cnt
ans %= mod
cnt += d
cnt %= mod
print(ans)
tktk_snsn