結果

問題 No.1325 Subsequence Score
ユーザー first_vilfirst_vil
提出日時 2020-12-22 09:23:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 206 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 172,400 KB
最終ジャッジ日時 2023-10-21 12:43:42
合計ジャッジ時間 5,434 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,436 KB
testcase_01 AC 35 ms
53,436 KB
testcase_02 AC 34 ms
53,436 KB
testcase_03 AC 40 ms
59,668 KB
testcase_04 AC 35 ms
53,436 KB
testcase_05 AC 39 ms
59,668 KB
testcase_06 AC 35 ms
53,436 KB
testcase_07 AC 39 ms
59,668 KB
testcase_08 AC 33 ms
53,436 KB
testcase_09 AC 34 ms
53,436 KB
testcase_10 AC 36 ms
53,436 KB
testcase_11 AC 34 ms
53,436 KB
testcase_12 AC 34 ms
53,436 KB
testcase_13 AC 201 ms
171,332 KB
testcase_14 AC 88 ms
95,420 KB
testcase_15 AC 181 ms
147,776 KB
testcase_16 AC 197 ms
160,616 KB
testcase_17 AC 109 ms
99,868 KB
testcase_18 AC 81 ms
92,856 KB
testcase_19 AC 206 ms
172,112 KB
testcase_20 AC 65 ms
83,744 KB
testcase_21 AC 93 ms
101,416 KB
testcase_22 AC 115 ms
101,744 KB
testcase_23 AC 205 ms
172,308 KB
testcase_24 AC 195 ms
172,312 KB
testcase_25 AC 201 ms
172,400 KB
testcase_26 AC 196 ms
172,312 KB
testcase_27 AC 198 ms
172,308 KB
testcase_28 AC 33 ms
53,436 KB
testcase_29 AC 34 ms
53,436 KB
testcase_30 AC 40 ms
53,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input=sys.stdin.readline
    mod=998244353
    n=int(input())
    a=list(map(int,input().split()))
    
    p=pow(2,n-2,mod)
    
    ans=0
    for i in range(n):
        ans=(ans+a[i]*(p*2+i*p))%mod
    print(ans)
main()
0