結果

問題 No.1325 Subsequence Score
ユーザー 👑 rin204rin204
提出日時 2022-02-12 21:23:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 174,620 KB
最終ジャッジ日時 2023-09-11 09:43:20
合計ジャッジ時間 7,591 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,492 KB
testcase_01 AC 69 ms
71,364 KB
testcase_02 AC 68 ms
71,120 KB
testcase_03 AC 133 ms
76,480 KB
testcase_04 AC 69 ms
71,100 KB
testcase_05 AC 74 ms
76,628 KB
testcase_06 AC 70 ms
71,432 KB
testcase_07 AC 75 ms
76,768 KB
testcase_08 AC 70 ms
71,124 KB
testcase_09 AC 71 ms
71,540 KB
testcase_10 AC 71 ms
71,368 KB
testcase_11 AC 69 ms
71,500 KB
testcase_12 AC 72 ms
71,224 KB
testcase_13 AC 190 ms
174,016 KB
testcase_14 AC 100 ms
98,536 KB
testcase_15 AC 154 ms
137,708 KB
testcase_16 AC 162 ms
146,824 KB
testcase_17 AC 122 ms
100,840 KB
testcase_18 AC 96 ms
95,908 KB
testcase_19 AC 187 ms
174,176 KB
testcase_20 AC 87 ms
86,148 KB
testcase_21 AC 111 ms
104,612 KB
testcase_22 AC 125 ms
102,316 KB
testcase_23 AC 192 ms
174,620 KB
testcase_24 AC 189 ms
174,600 KB
testcase_25 AC 176 ms
142,256 KB
testcase_26 AC 172 ms
142,044 KB
testcase_27 AC 175 ms
142,192 KB
testcase_28 AC 71 ms
71,108 KB
testcase_29 AC 68 ms
71,228 KB
testcase_30 AC 69 ms
71,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n = int(input())
A = list(map(int, input().split()))
ans = 0
for i, a in enumerate(A, 2):
    ans += i * a
    ans %= MOD
ans *= pow(2, n - 2, MOD)
print(ans % MOD)
0