結果

問題 No.1325 Subsequence Score
ユーザー anagohirameanagohirame
提出日時 2020-12-23 00:12:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 204 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,824 KB
実行使用メモリ 172,668 KB
最終ジャッジ日時 2023-10-21 13:10:22
合計ジャッジ時間 4,993 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,444 KB
testcase_01 AC 36 ms
53,444 KB
testcase_02 AC 35 ms
53,444 KB
testcase_03 AC 40 ms
59,940 KB
testcase_04 AC 36 ms
53,444 KB
testcase_05 AC 41 ms
59,940 KB
testcase_06 AC 35 ms
53,444 KB
testcase_07 AC 39 ms
59,940 KB
testcase_08 AC 35 ms
53,444 KB
testcase_09 AC 35 ms
53,444 KB
testcase_10 AC 41 ms
53,444 KB
testcase_11 AC 37 ms
53,444 KB
testcase_12 AC 36 ms
53,444 KB
testcase_13 AC 213 ms
171,592 KB
testcase_14 AC 87 ms
96,992 KB
testcase_15 AC 180 ms
148,168 KB
testcase_16 AC 198 ms
160,880 KB
testcase_17 AC 113 ms
101,844 KB
testcase_18 AC 81 ms
94,248 KB
testcase_19 AC 212 ms
172,376 KB
testcase_20 AC 65 ms
84,612 KB
testcase_21 AC 107 ms
103,556 KB
testcase_22 AC 117 ms
103,808 KB
testcase_23 AC 213 ms
172,668 KB
testcase_24 AC 211 ms
172,656 KB
testcase_25 AC 212 ms
172,600 KB
testcase_26 AC 209 ms
172,648 KB
testcase_27 AC 210 ms
172,648 KB
testcase_28 AC 34 ms
53,444 KB
testcase_29 AC 36 ms
53,444 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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