結果
問題 | No.1299 Random Array Score |
ユーザー |
![]() |
提出日時 | 2020-11-27 21:54:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 106 ms / 2,000 ms |
コード長 | 886 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 33,128 KB |
最終ジャッジ日時 | 2024-07-26 12:24:53 |
合計ジャッジ時間 | 4,086 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
import sysinput = sys.stdin.readlineenum = enumerateinf = 1001001001002002002MOD = 998244353 #10**9 + 7import collectionsimport randomfrom bisect import bisect_right as bs_rfrom itertools import permutationsdef linput(ty=int, cvt=list):return cvt(map(ty,input().split()))def vinput(rep=1, ty=int, cvt=list):return cvt(ty(input().rstrip()) for _ in range(rep))def gcd(a: int, b: int):while b: a, b = b, a%breturn adef lcm(a: int, b: int):return a * b // gcd(a, b)def dist(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)vD = [chr(ord("a")+i) for i in range(26)]def bye(res):sT = "No Yes".split()print(sT[res])#exit(0)def csum(v):vr = [0,]s = 0for a in v:s = (s+a)vr.append(s)return vrdef main():N,K = linput()vA = linput()s = sum(vA) % MODres = pow(2,K,MOD) * s % MODprint(res)if __name__ == "__main__":main()