#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
inline int add(int a, int b) {
  if ((a += b) >= mod) a -= mod;
  return a;
}
inline int mult(int a, int b) {
  long long t = 1ll * a * b;
  if (t >= mod) t %= mod;
  return t;
}
inline int power(int a, int b) {
  int out = 1;
  while (b) {
    if (b & 1) out = mult(out, a);
    a = mult(a, a);
    b >>= 1;
  }
  return out;
}
int n, K, w[200010], fac[200010], ifac[200010];
inline int C(int a, int b) {
  if (a < b) return 0;
  return mult(fac[a], mult(ifac[b], ifac[a - b]));
}
inline int S(int n, int k) {
  int ret = 0;
  for (int i = 0; i <= k; i++)
    ret = add(ret, mult(power(mod - 1, i), mult(C(k, i), power(k - i, n))));
  return mult(ret, ifac[k]);
}
int main() {
  scanf("%d%d", &n, &K);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = mult(fac[i - 1], i);
  ifac[n] = power(fac[n], mod - 2);
  for (int i = n - 1; i >= 0; i--) ifac[i] = mult(ifac[i + 1], i + 1);
  int sum = 0;
  for (int i = 1, ti; i <= n; i++) scanf("%d", &ti), sum = add(sum, ti);
  printf("%d\n", mult(add(S(n, K), mult(n - 1, S(n - 1, K))), sum));
  return 0;
}
