#include <bits/stdc++.h>
using namespace std;
long long n, k, sum, f[200010], inv[200010];
long long ksm(long long x, long long y) {
  long long fin = 1;
  while (y) {
    if (y & 1) fin = fin * x % 1000000007;
    x = x * x % 1000000007, y >>= 1;
  }
  return fin;
}
long long S(long long n, long long m) {
  if (n < m) return 0;
  long long ret = 0;
  for (long long i = 0; i <= m; i++) {
    long long t = f[m] * inv[i] % 1000000007 * inv[m - i] % 1000000007 *
                  ksm(m - i, n) % 1000000007;
    if (i & 1)
      ret = (ret - t) % 1000000007;
    else
      ret = (ret + t) % 1000000007;
  }
  return (ret * inv[m] % 1000000007 + 1000000007) % 1000000007;
}
signed main() {
  scanf("%I64d%I64d", &n, &k);
  f[0] = f[1] = inv[0] = inv[1] = 1;
  for (long long i = 2; i < 200010; i++)
    f[i] = f[i - 1] * i % 1000000007,
    inv[i] = (1000000007 - 1000000007 / i) * inv[1000000007 % i] % 1000000007;
  for (long long i = 2; i < 200010; i++)
    inv[i] = inv[i] * inv[i - 1] % 1000000007;
  for (long long i = 1; i <= n; i++) {
    long long x;
    scanf("%I64d", &x);
    sum = (sum + x) % 1000000007;
  }
  printf("%I64d", ((n - 1) * S(n - 1, k) % 1000000007 + S(n, k)) % 1000000007 *
                      sum % 1000000007);
  return 0;
}
