結果

問題 No.1325 Subsequence Score
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-22 02:52:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 66,920 KB
最終ジャッジ日時 2023-10-21 12:23:16
合計ジャッジ時間 7,010 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,156 KB
testcase_01 AC 29 ms
10,156 KB
testcase_02 AC 29 ms
10,156 KB
testcase_03 AC 30 ms
10,276 KB
testcase_04 AC 30 ms
10,236 KB
testcase_05 AC 31 ms
10,352 KB
testcase_06 AC 30 ms
10,212 KB
testcase_07 AC 31 ms
10,292 KB
testcase_08 AC 29 ms
10,156 KB
testcase_09 AC 30 ms
10,172 KB
testcase_10 AC 30 ms
10,192 KB
testcase_11 AC 30 ms
10,212 KB
testcase_12 AC 30 ms
10,240 KB
testcase_13 AC 437 ms
66,624 KB
testcase_14 AC 149 ms
25,148 KB
testcase_15 AC 363 ms
57,868 KB
testcase_16 AC 407 ms
65,912 KB
testcase_17 AC 208 ms
32,584 KB
testcase_18 AC 131 ms
23,432 KB
testcase_19 AC 428 ms
65,668 KB
testcase_20 AC 85 ms
17,092 KB
testcase_21 AC 172 ms
28,680 KB
testcase_22 AC 201 ms
33,560 KB
testcase_23 AC 450 ms
66,920 KB
testcase_24 AC 440 ms
66,920 KB
testcase_25 AC 441 ms
66,920 KB
testcase_26 AC 439 ms
66,920 KB
testcase_27 AC 442 ms
66,920 KB
testcase_28 AC 30 ms
10,156 KB
testcase_29 AC 29 ms
10,156 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
mod = 998244353

if N == 1:
    print(A[0])
    exit()

ans = 0
cnt = pow(2, N - 1, mod)
d = pow(2, N - 2, mod)
for a in A:
    ans += a * cnt
    ans %= mod
    cnt += d
    cnt %= mod

print(ans)
0