結果

問題 No.1325 Subsequence Score
ユーザー H3PO4H3PO4
提出日時 2020-12-22 00:43:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 431 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 11,800 KB
実行使用メモリ 67,180 KB
最終ジャッジ日時 2023-10-21 12:16:44
合計ジャッジ時間 6,976 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,152 KB
testcase_01 AC 29 ms
10,152 KB
testcase_02 AC 30 ms
10,152 KB
testcase_03 AC 30 ms
10,284 KB
testcase_04 AC 29 ms
10,224 KB
testcase_05 AC 31 ms
10,348 KB
testcase_06 AC 29 ms
10,200 KB
testcase_07 AC 30 ms
10,284 KB
testcase_08 AC 29 ms
10,152 KB
testcase_09 AC 29 ms
10,164 KB
testcase_10 AC 29 ms
10,180 KB
testcase_11 AC 30 ms
10,200 KB
testcase_12 AC 29 ms
10,244 KB
testcase_13 AC 420 ms
66,364 KB
testcase_14 AC 139 ms
25,140 KB
testcase_15 AC 351 ms
55,628 KB
testcase_16 AC 397 ms
62,192 KB
testcase_17 AC 192 ms
32,836 KB
testcase_18 AC 124 ms
23,296 KB
testcase_19 AC 415 ms
65,656 KB
testcase_20 AC 80 ms
17,088 KB
testcase_21 AC 161 ms
28,672 KB
testcase_22 AC 196 ms
33,164 KB
testcase_23 AC 418 ms
65,936 KB
testcase_24 AC 416 ms
67,180 KB
testcase_25 AC 425 ms
67,180 KB
testcase_26 AC 430 ms
67,180 KB
testcase_27 AC 431 ms
67,180 KB
testcase_28 AC 29 ms
10,152 KB
testcase_29 AC 29 ms
10,152 KB
testcase_30 AC 28 ms
10,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = tuple(map(int, input().split()))
MOD = 998244353
ans = 0
P = pow(2, N - 2, MOD)
for i, a in enumerate(A):
    ans += a * (i + 2) * P
    ans %= MOD
print(ans)
0