#include <bits/stdc++.h>
using namespace std;
const int CN = 2e5 + 10;
const int P = 1e9 + 7;
int read() {
  int s = 0, ne = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') ne = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) s = (s << 1) + (s << 3) + c - '0';
  return s * ne;
}
int add(int x, int y) { return x + y >= P ? x + y - P : x + y; }
int qp(int a, int b) {
  int r = 1;
  for (; b; a = 1ll * a * a % P, b >>= 1)
    if (b & 1) r = 1ll * r * a % P;
  return r;
}
int fac[CN], iv[CN], ifac[CN];
void init(int n) {
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = 1ll * i * fac[i - 1] % P;
  iv[1] = 1;
  for (int i = 2; i <= n; i++) iv[i] = 1ll * iv[P % i] * (P - P / i) % P;
  ifac[0] = 1;
  for (int i = 1; i <= n; i++) ifac[i] = 1ll * ifac[i - 1] * iv[i] % P;
}
int C(int n, int m) { return 1ll * fac[n] * ifac[m] % P * ifac[n - m] % P; }
int S(int n, int m) {
  int res = 0;
  for (int i = 0; i <= m; i++) {
    int cur = 1ll * C(m, i) * qp(m - i, n) % P;
    res = add(res, i & 1 ? P - cur : cur);
  }
  return 1ll * res * ifac[m] % P;
}
int n, k, s, ans;
int main() {
  init(2e5), n = read(), k = read();
  for (int i = 0; i < n; i++) s = add(s, read());
  return ans = 1ll * s * add(S(n, k), 1ll * (n - 1) * S(n - 1, k) % P) % P,
         printf("%d\n", ans), 0;
}
