#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
int pow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = 1ll * ret * x % 1000000007;
    x = 1ll * x * x % 1000000007;
    y >>= 1;
  }
  return ret;
}
int ifact[200010];
int S(int n, int m) {
  int ret = 0;
  for (int i = 0, M = 1; i <= m; ++i, M = 1000000007 - M)
    ret = (ret + 1ll * M * ifact[i] % 1000000007 * ifact[m - i] % 1000000007 *
                     pow(m - i, n)) %
          1000000007;
  return ret;
}
int main() {
  int n = gi(), k = gi(), W = 0;
  for (int i = 1; i <= n; ++i) W = (W + gi()) % 1000000007;
  ifact[0] = 1;
  for (int i = 1; i <= n; ++i) ifact[i] = 1ll * ifact[i - 1] * i % 1000000007;
  ifact[n] = pow(ifact[n], 1000000007 - 2);
  for (int i = n; i; --i) ifact[i - 1] = 1ll * ifact[i] * i % 1000000007;
  printf("%d\n", 1ll * W *
                     (S(n, k) + 1ll * (n - 1) * S(n - 1, k) % 1000000007) %
                     1000000007);
  return 0;
}
