#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int maxn = 3e5;
long long int fac[maxn] = {}, inv[maxn] = {};
long long int power(long long int x, long long int y) {
  long long int res = 1, tem = x;
  for (; y; y >>= 1) {
    if (y & 1) res = (res % mod) * (tem % mod) % mod;
    tem = (tem % mod) * (tem % mod) % mod;
  }
  return res;
}
long long int C(int n, int m) {
  if (m == 0 || n == m) return 1;
  long long res = 1;
  res = res * fac[n] % mod * inv[m] % mod * inv[n - m] % mod;
  return res;
}
long long int S(long long int n, long long int m) {
  long long int ans = 0;
  for (int i = 0; i <= m; i++) {
    long long int t = 1ll * inv[i] * inv[m - i] % mod * power(m - i, n) % mod;
    if (i & 1)
      (ans -= t) %= mod;
    else
      (ans += t) %= mod;
  }
  return ans;
}
int main() {
  long long int ans1 = 0, n, k;
  scanf("%lld%lld", &n, &k);
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= k; i++) inv[i] = -1ll * mod / i * inv[mod % i] % mod;
  for (int i = 1; i <= k; i++) inv[i] = 1ll * inv[i - 1] * inv[i] % mod;
  for (int i = 1; i <= n; i++) {
    long long int w;
    scanf("%lld", &w);
    ans1 = (ans1 + w) % mod;
  }
  long long int tem1 = 1, tem2, ans = 0;
  for (long long int i = 2; i <= k; i++) {
    tem1 = (tem1 * i) % mod;
    if (i == k - 1) tem2 = tem1;
  }
  ans = (S(n - 1, k - 1) % mod + 1ll * (n + k - 1) * S(n - 1, k) % mod) % mod;
  printf("%lld\n", (ans * ans1 % mod + mod) % mod);
  return 0;
}
