#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
long long fac[maxn];
long long ifac[maxn];
void initial(const int n = 2e5) {
  fac[0] = 1;
  fac[1] = 1;
  for (int i = 2; i <= n; i++) fac[i] = 1ll * i * fac[i - 1] % mod;
  ifac[0] = 1;
  ifac[1] = 1;
  for (int i = 2; i <= n; i++) ifac[i] = (mod - mod / i) * ifac[mod % i] % mod;
  for (int i = 2; i <= n; i++) ifac[i] = ifac[i] * ifac[i - 1] % mod;
}
long long C(int n, int m) { return fac[n] * ifac[n - m] % mod * ifac[m] % mod; }
long long _pow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
long long s(int n, int k) {
  long long res = 0;
  for (int j = 0; j <= k; j++) {
    if ((j + k) & 1)
      res = (res - C(k, j) * _pow(j, n) % mod + mod) % mod;
    else
      res = (res + C(k, j) * _pow(j, n) % mod) % mod;
  }
  res = res * ifac[k] % mod;
  return res;
}
int main(void) {
  initial();
  int n, k;
  scanf("%d%d", &n, &k);
  long long res = s(n, k) + 1ll * (n - 1) * s(n - 1, k) % mod;
  res %= mod;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    sum = (sum + x) % mod;
  }
  res = 1ll * res * sum % mod;
  printf("%lld\n", res);
  return 0;
}
