結果

問題 No.1325 Subsequence Score
ユーザー anagohirameanagohirame
提出日時 2020-12-23 00:11:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 214 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 81,820 KB
実行使用メモリ 172,412 KB
最終ジャッジ日時 2023-10-21 13:10:17
合計ジャッジ時間 4,889 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,332 KB
testcase_01 AC 35 ms
53,332 KB
testcase_02 AC 37 ms
53,332 KB
testcase_03 AC 40 ms
59,852 KB
testcase_04 AC 35 ms
53,332 KB
testcase_05 AC 40 ms
59,852 KB
testcase_06 AC 36 ms
53,332 KB
testcase_07 AC 40 ms
59,852 KB
testcase_08 AC 35 ms
53,332 KB
testcase_09 AC 35 ms
53,332 KB
testcase_10 AC 35 ms
53,332 KB
testcase_11 AC 38 ms
53,332 KB
testcase_12 AC 36 ms
53,332 KB
testcase_13 AC 214 ms
171,504 KB
testcase_14 AC 87 ms
96,900 KB
testcase_15 AC 181 ms
148,080 KB
testcase_16 AC 199 ms
160,792 KB
testcase_17 AC 115 ms
101,756 KB
testcase_18 AC 81 ms
94,156 KB
testcase_19 AC 212 ms
172,288 KB
testcase_20 AC 64 ms
84,520 KB
testcase_21 AC 98 ms
103,464 KB
testcase_22 AC 117 ms
103,920 KB
testcase_23 AC 210 ms
172,412 KB
testcase_24 AC 211 ms
172,400 KB
testcase_25 AC 214 ms
172,396 KB
testcase_26 AC 213 ms
172,392 KB
testcase_27 AC 213 ms
172,388 KB
testcase_28 AC 35 ms
53,332 KB
testcase_29 AC 35 ms
53,332 KB
testcase_30 AC 35 ms
53,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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