#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch - '0' < 0 || ch - '0' > 9) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch - '0' >= 0 && ch - '0' <= 9) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, K;
int w[200010], fac[200010], inv[200010];
int quick_pow(int x, int p) {
  int an = 1, po = x;
  while (p) {
    if (p & 1) an = 1ll * an * po % 1000000007;
    po = 1ll * po * po % 1000000007;
    p >>= 1;
  }
  return an;
}
int C(int x, int y) {
  return 1ll * fac[x] * inv[y] % 1000000007 * inv[x - y] % 1000000007;
}
int calc(int x, int y) {
  int res = 0;
  for (int i = 0; i <= y; i++) {
    int tmp = 1ll * C(y, i) * quick_pow(y - i, x) % 1000000007;
    if (i & 1)
      res = (res - tmp + 1000000007) % 1000000007;
    else
      res = (res + tmp) % 1000000007;
  }
  return 1ll * res * inv[y] % 1000000007;
}
int main() {
  n = read();
  K = read();
  int sum = 0;
  for (int i = 1; i <= n; i++) w[i] = read(), sum = (sum + w[i]) % 1000000007;
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1ll * fac[i - 1] * i % 1000000007;
  inv[n] = quick_pow(fac[n], 1000000007 - 2);
  for (int i = n - 1; i >= 0; i--)
    inv[i] = 1ll * inv[i + 1] * (i + 1) % 1000000007;
  int x = calc(n, K), y = calc(n - 1, K);
  x = (x + 1ll * y * (n - 1) % 1000000007) % 1000000007;
  x = 1ll * x * sum % 1000000007;
  cout << x << endl;
  return 0;
}
