結果

問題 No.1325 Subsequence Score
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-22 02:48:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 81,704 KB
実行使用メモリ 153,276 KB
最終ジャッジ日時 2023-10-21 12:23:01
合計ジャッジ時間 4,211 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,240 KB
testcase_01 AC 40 ms
53,240 KB
testcase_02 AC 40 ms
53,240 KB
testcase_03 AC 43 ms
59,728 KB
testcase_04 AC 39 ms
53,240 KB
testcase_05 AC 43 ms
59,728 KB
testcase_06 AC 39 ms
53,240 KB
testcase_07 AC 44 ms
59,728 KB
testcase_08 AC 39 ms
53,240 KB
testcase_09 AC 39 ms
53,240 KB
testcase_10 AC 39 ms
53,240 KB
testcase_11 AC 39 ms
53,240 KB
testcase_12 AC 39 ms
53,240 KB
testcase_13 AC 150 ms
152,828 KB
testcase_14 AC 76 ms
94,120 KB
testcase_15 AC 139 ms
135,104 KB
testcase_16 AC 145 ms
143,912 KB
testcase_17 AC 101 ms
101,612 KB
testcase_18 AC 72 ms
89,216 KB
testcase_19 AC 153 ms
153,128 KB
testcase_20 AC 57 ms
75,344 KB
testcase_21 AC 83 ms
100,932 KB
testcase_22 AC 103 ms
103,512 KB
testcase_23 AC 152 ms
153,272 KB
testcase_24 AC 151 ms
153,252 KB
testcase_25 AC 152 ms
153,276 KB
testcase_26 AC 151 ms
153,272 KB
testcase_27 AC 152 ms
153,268 KB
testcase_28 AC 38 ms
53,152 KB
testcase_29 AC 38 ms
53,152 KB
testcase_30 AC 37 ms
53,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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