結果

問題 No.1299 Random Array Score
ユーザー mkawa2mkawa2
提出日時 2020-11-27 21:43:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 1,054 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 27,424 KB
最終ジャッジ日時 2023-10-01 05:11:41
合計ジャッジ時間 3,879 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,552 KB
testcase_01 AC 20 ms
8,536 KB
testcase_02 AC 21 ms
8,532 KB
testcase_03 AC 76 ms
27,348 KB
testcase_04 AC 75 ms
26,764 KB
testcase_05 AC 63 ms
22,560 KB
testcase_06 AC 58 ms
20,968 KB
testcase_07 AC 60 ms
21,688 KB
testcase_08 AC 75 ms
26,664 KB
testcase_09 AC 21 ms
9,148 KB
testcase_10 AC 42 ms
15,460 KB
testcase_11 AC 26 ms
10,404 KB
testcase_12 AC 57 ms
20,388 KB
testcase_13 AC 74 ms
26,204 KB
testcase_14 AC 57 ms
20,656 KB
testcase_15 AC 58 ms
21,124 KB
testcase_16 AC 58 ms
20,948 KB
testcase_17 AC 27 ms
10,968 KB
testcase_18 AC 44 ms
16,100 KB
testcase_19 AC 48 ms
17,552 KB
testcase_20 AC 35 ms
13,448 KB
testcase_21 AC 20 ms
9,000 KB
testcase_22 AC 28 ms
11,044 KB
testcase_23 AC 57 ms
20,596 KB
testcase_24 AC 63 ms
22,440 KB
testcase_25 AC 56 ms
20,552 KB
testcase_26 AC 21 ms
8,816 KB
testcase_27 AC 29 ms
11,644 KB
testcase_28 AC 26 ms
10,780 KB
testcase_29 AC 32 ms
12,228 KB
testcase_30 AC 57 ms
20,056 KB
testcase_31 AC 32 ms
12,780 KB
testcase_32 AC 73 ms
26,220 KB
testcase_33 AC 79 ms
27,424 KB
testcase_34 AC 53 ms
11,940 KB
testcase_35 AC 78 ms
27,348 KB
testcase_36 AC 53 ms
11,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# from operator import itemgetter
# from itertools import *
# from bisect import *
from collections import *
from heapq import *
import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def MI(): return map(int, sys.stdin.buffer.readline().split())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MI1(): return map(int1, sys.stdin.buffer.readline().split())
def LI1(): return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
def inval(ni, nj, h, w):
    if ni < 0 or ni >= h or nj < 0 or nj >= w: return True
    return False
dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
inf = 10**16
# md = 10 ** 9 + 7
md = 998244353

n,k=MI()
aa=LI()
s=sum(aa)
ans=(s+s*(pow(2,k,md)-1))%md
print(ans)
0