結果

問題 No.1325 Subsequence Score
ユーザー KudeKude
提出日時 2020-12-22 03:36:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 583 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,764 KB
実行使用メモリ 136,376 KB
最終ジャッジ日時 2023-10-21 12:24:11
合計ジャッジ時間 8,234 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,528 KB
testcase_01 AC 37 ms
53,528 KB
testcase_02 AC 33 ms
53,528 KB
testcase_03 AC 42 ms
60,068 KB
testcase_04 AC 36 ms
53,528 KB
testcase_05 AC 43 ms
62,116 KB
testcase_06 AC 36 ms
53,528 KB
testcase_07 AC 41 ms
60,068 KB
testcase_08 AC 33 ms
53,528 KB
testcase_09 AC 34 ms
53,528 KB
testcase_10 AC 34 ms
53,528 KB
testcase_11 AC 33 ms
53,528 KB
testcase_12 AC 35 ms
53,528 KB
testcase_13 AC 507 ms
135,516 KB
testcase_14 AC 171 ms
93,664 KB
testcase_15 AC 447 ms
120,056 KB
testcase_16 AC 507 ms
128,712 KB
testcase_17 AC 245 ms
100,900 KB
testcase_18 AC 160 ms
91,184 KB
testcase_19 AC 583 ms
136,256 KB
testcase_20 AC 103 ms
83,396 KB
testcase_21 AC 212 ms
98,644 KB
testcase_22 AC 253 ms
101,672 KB
testcase_23 AC 543 ms
136,332 KB
testcase_24 AC 548 ms
136,332 KB
testcase_25 AC 562 ms
136,376 KB
testcase_26 AC 550 ms
136,332 KB
testcase_27 AC 563 ms
136,336 KB
testcase_28 AC 36 ms
53,528 KB
testcase_29 AC 33 ms
53,528 KB
testcase_30 AC 36 ms
53,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
n = int(input())
ans = 0
for i, b in enumerate(map(int, input().split())):
    ans += (pow(2, n - 1, MOD) + (pow(2, n - 2, MOD) * i if n > 1 else 0)) * b
print(ans % MOD)
0