import sys input = sys.stdin.readline N, K = map(int, input().split()) A = list(map(int, input().split())) if K==0: print(sum(A)%MOD) exit() MOD = 998244353 S = sum(A)*pow(N, K, MOD) for Ai in A: S = (S+N*(pow(2, K, MOD)-1)*Ai*pow(N, K-1, MOD))%MOD S = (S*pow(pow(N, K, MOD), MOD-2, MOD))%MOD print(S)