#include <bits/stdc++.h>
using namespace std;
long long inv[200005], f[200005], jie[200005];
long long qmi(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b % 2) ans = ans * a % 1000000007;
    a = a * a % 1000000007;
    b /= 2;
  }
  return ans;
}
long long C(long long x, long long y) {
  long long ans;
  ans = jie[x] * f[y] % 1000000007 * f[x - y] % 1000000007;
  return ans;
}
long long S(long long n, long long k) {
  long long ans = 0;
  for (int i = 0; i <= k; i++) {
    if ((k + i) % 2)
      ans =
          ((ans - C(k, i) * qmi(i, n) % 1000000007) % 1000000007 + 1000000007) %
          1000000007;
    else
      ans =
          ((ans + C(k, i) * qmi(i, n) % 1000000007) % 1000000007 + 1000000007) %
          1000000007;
  }
  ans = ans * f[k] % 1000000007;
  return ans;
}
int main() {
  jie[0] = f[0] = inv[0] = 1;
  for (long long i = 1; i < 200005; i++) inv[i] = qmi(i, 1000000007 - 2);
  for (long long i = 1; i < 200005; i++)
    f[i] = f[i - 1] * inv[i] % 1000000007, jie[i] = jie[i - 1] * i % 1000000007;
  long long n, k, sum = 0;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    long long r;
    cin >> r;
    sum = (sum + r) % 1000000007;
  }
  long long res = (S(n, k) + (n - 1) * S(n - 1, k) % 1000000007) % 1000000007 *
                  sum % 1000000007;
  cout << res << endl;
}
