#include <bits/stdc++.h>
using namespace std;
long long fact[200001], inv_fact[200001];
long long ModExp(int a, int n) {
  long long x = a, y = 1 % 1000000007;
  while (n) {
    if (n % 2) y = (y * x) % 1000000007;
    x = (x * x) % 1000000007;
    n /= 2;
  }
  return y;
}
long long ModInv(int a) { return ModExp(a, 1000000007 - 2); }
void Initialise() {
  fact[0] = 1 % 1000000007;
  for (int i = 1; i < 200001; ++i) fact[i] = (i * fact[i - 1]) % 1000000007;
  inv_fact[200001 - 1] = ModInv((int)fact[200001 - 1]);
  for (int i = 200001 - 2; i > -1; --i)
    inv_fact[i] = ((i + 1) * inv_fact[i + 1]) % 1000000007;
}
long long StirlingNumber2(int n, int k) {
  if (n < k) return 0ll;
  long long ans = 0;
  for (int j = 0, c = k % 2 ? -1 : 1; j <= k; ++j, c = -c) {
    long long ansx = (inv_fact[k - j] * inv_fact[j]) % 1000000007;
    ansx = (ansx * ModExp(j, n)) % 1000000007;
    ans = (ans + 1000000007 + c * ansx) % 1000000007;
  }
  return ans;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  long long s = 0;
  for (int i = 1; i <= n; ++i) {
    int j;
    scanf("%d", &j);
    s = (s + j) % 1000000007;
  }
  Initialise();
  long long c = (StirlingNumber2(n, k) + (n - 1) * StirlingNumber2(n - 1, k)) %
                1000000007;
  long long ans = (c * s) % 1000000007;
  printf("%lld\n", ans);
  return 0;
}
