#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, k, x;
int a[200100];
long long sum, op[2] = {1, mod - 1};
long long fac[200100], iv[200100];
long long C(int x, int y) { return fac[x] * iv[y] % mod * iv[x - y] % mod; }
long long power(long long x, long long y) {
  long long ret = 1;
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ret = ret * x % mod;
  return ret;
}
long long S(int n, int k) {
  long long ret = 0;
  for (int i = 0; i < k; i++)
    ret = (ret + op[i & 1] * C(k, i) % mod * power(k - i, n) % mod) % mod;
  return ret * iv[k] % mod;
}
int main() {
  scanf("%d%d", &n, &k);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % mod;
  iv[n] = power(fac[n], mod - 2);
  for (int i = n - 1; i >= 0; i--) iv[i] = iv[i + 1] * (i + 1) % mod;
  for (int i = 1; i <= n; i++) scanf("%d", &x), sum += x;
  sum = (sum % mod + mod) % mod;
  printf("%lld\n", sum * (S(n, k) + (n - 1) * S(n - 1, k) % mod) % mod);
  return 0;
}
