#include <bits/stdc++.h>
using namespace std;
long long gi() {
  long long ret = 0;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  char c = ch == '-' ? getchar() : ch;
  while (c >= '0' && c <= '9') ret = ret * 10 + c - '0', c = getchar();
  return ch == '-' ? -ret : ret;
}
const int mo = 1e9 + 7;
const int N = 200010;
int n, k, a[N];
long long fac[N], ifac[N];
long long ksm(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % mo;
    a = a * a % mo;
    b >>= 1;
  }
  return ret;
}
long long C(int n, int m) {
  if (n < m) return 0;
  return fac[n] * ifac[m] % mo * ifac[n - m] % mo;
}
void calcS(long long &s, int k) {
  for (int i = 0; i <= k; i += 1)
    (s += ((i & 1) ? -1 : 1) * C(k, i) % mo * ksm(k - i, n - 1)) %= mo;
  s = s * ifac[k] % mo;
}
int main() {
  n = gi();
  k = gi();
  for (int i = 1; i <= n; i += 1) a[i] = gi();
  fac[0] = ifac[0] = 1;
  for (int i = 1; i <= n; i += 1) fac[i] = fac[i - 1] * i % mo;
  ifac[n] = ksm(fac[n], mo - 2);
  for (int i = n; i >= 1; i -= 1) ifac[i - 1] = ifac[i] * i % mo;
  long long s1 = 0, s2 = 0;
  calcS(s1, k - 1);
  calcS(s2, k);
  long long ans = 0;
  for (int i = 1; i <= n; i += 1)
    (ans += s1 * a[i] + s2 * (n - 1 + k) % mo * a[i]) %= mo;
  cout << (ans + mo) % mo;
  return 0;
}
