結果

問題 No.1325 Subsequence Score
ユーザー first_vilfirst_vil
提出日時 2020-12-22 09:13:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 262 bytes
コンパイル時間 990 ms
コンパイル使用メモリ 11,928 KB
実行使用メモリ 66,856 KB
最終ジャッジ日時 2023-10-21 12:39:18
合計ジャッジ時間 29,131 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,212 KB
testcase_01 AC 26 ms
10,212 KB
testcase_02 AC 25 ms
10,212 KB
testcase_03 AC 29 ms
10,332 KB
testcase_04 AC 27 ms
10,288 KB
testcase_05 AC 28 ms
10,408 KB
testcase_06 AC 27 ms
10,268 KB
testcase_07 AC 30 ms
10,352 KB
testcase_08 AC 25 ms
10,212 KB
testcase_09 AC 25 ms
10,224 KB
testcase_10 AC 25 ms
10,244 KB
testcase_11 AC 26 ms
10,268 KB
testcase_12 AC 28 ms
10,300 KB
testcase_13 TLE -
testcase_14 AC 663 ms
25,268 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 AC 967 ms
32,704 KB
testcase_18 AC 558 ms
23,256 KB
testcase_19 TLE -
testcase_20 AC 299 ms
17,216 KB
testcase_21 AC 793 ms
28,536 KB
testcase_22 AC 1,002 ms
33,560 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 AC 26 ms
10,212 KB
testcase_29 AC 25 ms
10,212 KB
testcase_30 AC 26 ms
10,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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