結果
| 問題 | No.1299 Random Array Score | 
| コンテスト | |
| ユーザー |  ut00a | 
| 提出日時 | 2020-11-27 22:08:18 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 83 ms / 2,000 ms | 
| コード長 | 544 bytes | 
| コンパイル時間 | 443 ms | 
| コンパイル使用メモリ | 82,368 KB | 
| 実行使用メモリ | 102,560 KB | 
| 最終ジャッジ日時 | 2024-07-26 13:00:26 | 
| 合計ジャッジ時間 | 3,878 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 34 | 
ソースコード
from sys import stdin
def str_in():
    return stdin.readline().rstrip()
def int_in():
    return int(stdin.readline().rstrip())
def split_str_in():
    return stdin.readline().rstrip().split()
def split_int_in():
    return [int(x) for x in stdin.readline().rstrip().split()]
def mod_pow(x, n, mod):
    if n == 0:
        return 1
    res = mod_pow(x * x % mod, n // 2, mod)
    if n & 1:
        return res * x % mod
    return res
mod = 998244353
N, K = split_int_in()
A = split_int_in()
s = sum(A)
print(s * mod_pow(2, K, mod) % mod)
            
            
            
        