#include <bits/stdc++.h>
using namespace std;
inline void read(int& x) {
  x = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
}
int fac[200005], inv[200005];
inline int qpow(int x, int y) {
  int ans = 1;
  while (y) {
    if (y & 1) ans = 1ll * ans * x % 1000000007;
    x = 1ll * x * x % 1000000007;
    y >>= 1;
  }
  return ans;
}
inline int C(int n, int m) {
  return 1ll * fac[n] * inv[m] % 1000000007 * inv[n - m] % 1000000007;
}
inline int S(int n, int m) {
  int ans = 0;
  for (int i = 0; i <= m; ++i) {
    if (i & 1)
      ans = (0ll + ans + 1000000007 - 1ll * C(m, i) * qpow(m - i, n)) %
            1000000007;
    else
      ans = (0ll + ans + 1ll * C(m, i) * qpow(m - i, n)) % 1000000007;
  }
  ans = (ans % 1000000007 + 1000000007) % 1000000007;
  ans = 1ll * ans * inv[m] % 1000000007;
  return ans;
}
int main() {
  int n, k, w;
  long long sum = 0;
  read(n);
  read(k);
  for (int i = 1; i <= n; ++i) read(w), sum = (sum + w) % 1000000007;
  fac[0] = inv[0] = 1;
  for (int i = 1; i <= n; ++i) fac[i] = 1ll * fac[i - 1] * i % 1000000007;
  inv[n] = qpow(fac[n], 1000000007 - 2);
  for (int i = n - 1; i; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % 1000000007;
  sum = 1ll * sum *
        ((0ll + S(n, k) + 1ll * (n - 1) * S(n - 1, k)) % 1000000007) %
        1000000007;
  printf("%lld\n", sum);
  return 0;
}
