結果

問題 No.2550 MORE! JUMP! MORE!
ユーザー hato336hato336
提出日時 2023-11-25 13:40:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 406 ms / 2,000 ms
コード長 686 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 121,272 KB
最終ジャッジ日時 2023-11-25 13:40:21
合計ジャッジ時間 11,472 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
84,920 KB
testcase_01 AC 130 ms
84,920 KB
testcase_02 AC 130 ms
84,920 KB
testcase_03 AC 131 ms
85,048 KB
testcase_04 AC 137 ms
85,048 KB
testcase_05 AC 130 ms
85,048 KB
testcase_06 AC 130 ms
84,920 KB
testcase_07 AC 131 ms
85,048 KB
testcase_08 AC 130 ms
85,048 KB
testcase_09 AC 130 ms
84,920 KB
testcase_10 AC 130 ms
85,048 KB
testcase_11 AC 131 ms
84,920 KB
testcase_12 AC 141 ms
85,048 KB
testcase_13 AC 133 ms
84,920 KB
testcase_14 AC 131 ms
85,048 KB
testcase_15 AC 131 ms
84,920 KB
testcase_16 AC 134 ms
84,920 KB
testcase_17 AC 131 ms
84,920 KB
testcase_18 AC 131 ms
85,048 KB
testcase_19 AC 133 ms
85,048 KB
testcase_20 AC 299 ms
108,216 KB
testcase_21 AC 227 ms
98,360 KB
testcase_22 AC 169 ms
90,424 KB
testcase_23 AC 277 ms
105,656 KB
testcase_24 AC 406 ms
121,016 KB
testcase_25 AC 284 ms
107,832 KB
testcase_26 AC 249 ms
101,560 KB
testcase_27 AC 333 ms
114,104 KB
testcase_28 AC 313 ms
110,776 KB
testcase_29 AC 259 ms
103,352 KB
testcase_30 AC 379 ms
121,144 KB
testcase_31 AC 379 ms
121,272 KB
testcase_32 AC 384 ms
121,272 KB
testcase_33 AC 375 ms
121,272 KB
testcase_34 AC 378 ms
121,144 KB
testcase_35 AC 386 ms
121,272 KB
testcase_36 AC 380 ms
121,272 KB
testcase_37 AC 380 ms
121,144 KB
testcase_38 AC 380 ms
121,272 KB
testcase_39 AC 381 ms
121,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
n = int(input())
#
#alist = []
#s = input()

#for i in range(n):
#    alist.append(list(map(int,input().split())))

alist = list(map(int,input().split()))
mod = 998244353
if n == 1:
    exit(print(alist[0]))
ans = 0
for i in range(1,n+1):
    if i == 1:
        ans += alist[i-1] * pow(2,n-i-1,mod)
        ans %= mod
        continue
    if i == n:
        ans += alist[i-1] * pow(2,i-2,mod) * (i+1)
        ans %= mod
        continue
    ans += alist[i-1] * pow(2,i-2,mod) * (i+1) * pow(2,n-i-1,mod)
    ans %= mod
print(ans)
0