結果

問題 No.1325 Subsequence Score
ユーザー convexineqconvexineq
提出日時 2020-12-22 23:21:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,820 KB
実行使用メモリ 185,688 KB
最終ジャッジ日時 2023-10-21 13:08:44
合計ジャッジ時間 4,862 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,544 KB
testcase_01 AC 35 ms
53,544 KB
testcase_02 AC 36 ms
53,544 KB
testcase_03 AC 42 ms
60,100 KB
testcase_04 AC 36 ms
53,544 KB
testcase_05 AC 43 ms
62,148 KB
testcase_06 AC 36 ms
53,544 KB
testcase_07 AC 42 ms
60,100 KB
testcase_08 AC 35 ms
53,544 KB
testcase_09 AC 36 ms
53,544 KB
testcase_10 AC 35 ms
53,544 KB
testcase_11 AC 35 ms
53,544 KB
testcase_12 AC 36 ms
53,544 KB
testcase_13 AC 192 ms
184,060 KB
testcase_14 AC 88 ms
109,668 KB
testcase_15 AC 164 ms
158,036 KB
testcase_16 AC 183 ms
167,532 KB
testcase_17 AC 114 ms
117,436 KB
testcase_18 AC 83 ms
103,616 KB
testcase_19 AC 193 ms
185,604 KB
testcase_20 AC 61 ms
84,984 KB
testcase_21 AC 106 ms
107,524 KB
testcase_22 AC 118 ms
119,808 KB
testcase_23 AC 190 ms
185,676 KB
testcase_24 AC 191 ms
185,684 KB
testcase_25 AC 190 ms
185,688 KB
testcase_26 AC 190 ms
185,684 KB
testcase_27 AC 191 ms
185,684 KB
testcase_28 AC 34 ms
53,544 KB
testcase_29 AC 34 ms
53,544 KB
testcase_30 AC 34 ms
53,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
*a, = map(int,input().split())
MOD = 998244353
p2 = [1]
for i in range(n+3): p2.append(p2[-1]*2%MOD)
ans = 0
for i,ai in enumerate(a):
    v = p2[i] + i*p2[i-1]
    ans += v%MOD*p2[n-i-1]%MOD*ai%MOD
print(ans%MOD)
0