#include <bits/stdc++.h>
using namespace std;
int fact[200010], inv[200010];
int sum(int a, int b) {
  return (a + b >= 1000000007 ? a + b - 1000000007 : a + b);
}
int dif(int a, int b) { return (a < b ? a - b + 1000000007 : a - b); }
int prod(int a, int b) { return (1LL * a * b) % 1000000007; }
int power(int base, int exp) {
  int res;
  for (res = 1; exp; exp >>= 1) {
    if (exp & 1) res = prod(res, base);
    base = prod(base, base);
  }
  return res;
}
int comb(int n, int k) { return prod(prod(fact[n], inv[k]), inv[n - k]); }
int stirling(int n, int k) {
  if (n < k) return 0;
  int res, term, sign, j;
  for (res = 0, sign = ((k & 1) ? -1 : 1), j = 0; j <= k; ++j, sign = -sign) {
    term = prod(comb(k, j), power(j, n));
    if (sign > 0)
      res = sum(res, term);
    else
      res = dif(res, term);
  }
  return prod(res, inv[k]);
}
int main() {
  int i, k, n, s, w;
  for (fact[0] = 1, i = 1; i < 200010; ++i) fact[i] = prod(fact[i - 1], i);
  for (inv[200010 - 1] = power(fact[200010 - 1], 1000000007 - 2),
                    i = 200010 - 2;
       i >= 0; --i)
    inv[i] = prod(i + 1, inv[i + 1]);
  cin >> n >> k;
  for (s = 0, i = 1; i <= n; ++i) {
    cin >> w;
    s = sum(s, w);
  }
  cout << prod(s, sum(stirling(n, k), prod(n - 1, stirling(n - 1, k)))) << '\n';
  return 0;
}
