#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, mod = 1e9 + 7;
int fac[N], inv[N], x, n, k, sum;
inline int mul(int a, int b) { return a * 1ll * b % mod; }
inline int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int qpow(int a, int b) {
  if (b < 0) return 1;
  static int s;
  s = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) s = mul(s, a);
  return s;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &x), sum = add(sum, x);
  fac[0] = 1;
  for (int i = 1; i < k; ++i) fac[i] = mul(fac[i - 1], i);
  inv[k - 1] = qpow(fac[k - 1], mod - 2);
  for (int i = k - 2; i >= 0; --i) inv[i] = mul(inv[i + 1], i + 1);
  int ans = 0, tmp;
  for (int i = 0; i < k; ++i) {
    tmp = (i & 1 ? -1 : 1) *
          mul(k - 1 + n - i,
              mul(qpow(k - i, n - 2), mul(inv[i], inv[k - 1 - i])));
    tmp = tmp < 0 ? tmp + mod : tmp;
    ans = add(tmp, ans);
  }
  printf("%d\n", mul(ans, sum));
  return 0;
}
