#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 11;
const int mod = 1e9 + 7;
int n, m, x, ans, fac[N], ifac[N];
inline int fp(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) res = 1ll * res * a % mod;
  return res;
}
inline int C(int n, int m) {
  return 1ll * fac[n] * ifac[m] % mod * ifac[n - m] % mod;
}
inline int S(int n, int m) {
  int t = 1, ans = 0;
  for (register int i = 0; i <= m; ++i)
    ans = (ans + 1ll * t * C(m, i) * fp(m - i, n)) % mod, t = -t;
  ans = 1ll * ans * ifac[m] % mod;
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  ifac[0] = fac[0] = 1;
  for (register int i = 1; i <= n; ++i)
    fac[i] = 1ll * i * fac[i - 1] % mod, ifac[i] = fp(fac[i], mod - 2);
  for (register int i = 1; i <= n; ++i) {
    scanf("%d", &x);
    ans = (ans + x) % mod;
  }
  ans = 1ll * ans * (S(n, m) + 1ll * (n - 1) * S(n - 1, m) % mod) % mod;
  ans = (ans + mod) % mod;
  printf("%d\n", ans);
  return 0;
}
