#include <bits/stdc++.h>
using namespace std;
long long n, k, mod = 1e9 + 7, sum;
long long fac[200005], inv[200005];
long long power(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    y = y >> 1;
    x = x * x % mod;
  }
  return res;
}
long long c(long long k, long long n) {
  if (k > n) return 0;
  return fac[n] * inv[k] % mod * inv[n - k] % mod;
}
long long stirling2(long long k, long long n) {
  long long res = 0;
  for (long long i = 0; i <= k; i++) {
    long long coef = c(i, k) * power(k - i, n) % mod;
    if (i & 1)
      res = (res - coef + mod) % mod;
    else
      res = (res + coef) % mod;
  }
  return res * inv[k] % mod;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) {
    long long wi;
    cin >> wi;
    sum = (sum + wi) % mod;
  }
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % mod;
  inv[n] = power(fac[n], mod - 2);
  for (long long i = n - 1; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % mod;
  cout << sum * (stirling2(k, n) + (n - 1) * stirling2(k, n - 1) % mod) % mod;
}
