#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int quickpow(int a, int b) {
  int s = 1;
  if (b < 0) return 1;
  while (b) {
    if (b & 1) s = 1ll * s * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return s;
}
int n, k, ans, p;
int jc[200200], jv[200200], inv[200200];
int main() {
  cin >> n >> k;
  int t;
  for (int i = 1; i <= n; ++i) cin >> t, add(ans, t);
  inv[0] = inv[1] = jc[0] = jv[0] = 1;
  for (int i = 1; i <= k; ++i) jc[i] = 1ll * jc[i - 1] * i % mod;
  for (int i = 2; i <= k; ++i)
    inv[i] = 1ll * inv[mod % i] * (mod - mod / i) % mod;
  for (int i = 1; i <= k; ++i) jv[i] = 1ll * jv[i - 1] * inv[i] % mod;
  for (int i = 0, d = 1; i < k; ++i, d = mod - d) {
    add(p, 1ll * d * jv[i] % mod * jv[k - 1 - i] % mod * (n + k - i - 1) % mod *
               quickpow(k - i, n - 2) % mod);
  }
  ans = 1ll * ans * p % mod;
  cout << ans;
  return 0;
}
