結果

問題 No.1325 Subsequence Score
ユーザー hiro1729hiro1729
提出日時 2023-09-10 16:03:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 174,216 KB
最終ジャッジ日時 2023-09-10 16:03:40
合計ジャッジ時間 5,594 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,276 KB
testcase_01 AC 70 ms
71,212 KB
testcase_02 AC 70 ms
71,188 KB
testcase_03 AC 74 ms
76,472 KB
testcase_04 AC 71 ms
71,484 KB
testcase_05 AC 76 ms
76,396 KB
testcase_06 AC 72 ms
71,180 KB
testcase_07 AC 75 ms
76,372 KB
testcase_08 AC 71 ms
71,528 KB
testcase_09 AC 72 ms
71,408 KB
testcase_10 AC 71 ms
71,092 KB
testcase_11 AC 71 ms
71,336 KB
testcase_12 AC 72 ms
71,324 KB
testcase_13 AC 208 ms
174,216 KB
testcase_14 AC 106 ms
98,528 KB
testcase_15 AC 182 ms
152,232 KB
testcase_16 AC 201 ms
164,824 KB
testcase_17 AC 128 ms
100,592 KB
testcase_18 AC 101 ms
95,628 KB
testcase_19 AC 210 ms
174,140 KB
testcase_20 AC 89 ms
85,608 KB
testcase_21 AC 115 ms
104,572 KB
testcase_22 AC 132 ms
101,940 KB
testcase_23 AC 193 ms
142,080 KB
testcase_24 AC 199 ms
142,016 KB
testcase_25 AC 189 ms
142,408 KB
testcase_26 AC 191 ms
142,040 KB
testcase_27 AC 191 ms
142,184 KB
testcase_28 AC 70 ms
71,252 KB
testcase_29 AC 70 ms
71,388 KB
testcase_30 AC 71 ms
71,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
mod = 998244353
if n == 1:
	exit(print(a[0] % mod))
print(pow(2, n - 2, mod) * sum((i + 2) * a[i] for i in range(n)) % mod)
0