from itertools import product from random import randint MOD = 998244353 def slow_solve(N, K, As): ret = 0 for choices in product(range(N), repeat=K): A_copy = As.copy() for c in choices: delta = A_copy[c] for i in range(N): A_copy[i] += delta A_copy[i] %= MOD for A in A_copy: ret += A ret %= MOD ret *= pow(N, MOD - 1 - K, MOD) ret %= MOD return ret def solve(N, K, As): return pow(2, K, MOD) * sum(As) % MOD def test(): for _ in range(1000): N = randint(1, 5) K = randint(1, 5) As = [randint(0, 10 ** 9) for _ in range(N)] assert solve(N, K, As) == slow_solve(N, K, As) def main(): N, K = map(int, input().split()) As = list(map(int, input().split())) print(solve(N, K, As)) main()