#include <bits/stdc++.h>
using namespace std;
struct base {
  double x, y;
  base() { x = y = 0; }
  base(double _x, double _y) { x = _x, y = _y; }
  base(double _x) { x = _x, y = 0; }
  void operator=(double _x) { x = _x, y = 0; }
  double real() { return x; }
  double imag() { return y; }
  base operator+(const base& b) { return base(x + b.x, y + b.y); }
  void operator+=(const base& b) { x += b.x, y += b.y; }
  base operator*(const base& b) {
    return base(x * b.x - y * b.y, x * b.y + y * b.x);
  }
  void operator*=(const base& b) {
    double p = x * b.x - y * b.y, q = x * b.y + y * b.x;
    x = p, y = q;
  }
  void operator/=(double k) { x /= k, y /= k; }
  base operator-(const base& b) { return base(x - b.x, y - b.y); }
  void operator-=(const base& b) { x -= b.x, y -= b.y; }
  base conj() { return base(x, -y); }
  base operator/(double k) { return base(x / k, y / k); }
  void Print() { cerr << x << " + " << y << "i\n"; }
};
double PI = 2.0 * acos(0.0);
const int MAXN = 19;
const int maxn = (1 << MAXN);
base W[maxn], invW[maxn], P1[maxn], Q1[maxn];
void precompute_powers() {
  for (int i = 0; i < maxn / 2; i++) {
    double ang = (2 * PI * i) / maxn;
    double _cos = cos(ang), _sin = sin(ang);
    W[i] = base(_cos, _sin);
    invW[i] = base(_cos, -_sin);
  }
}
void fft(vector<base>& a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    for (int i = 0; i < n; i += len) {
      int ind = 0, add = maxn / len;
      for (int j = 0; j < len / 2; ++j) {
        base u = a[i + j],
             v = (a[i + j + len / 2] * (invert ? invW[ind] : W[ind]));
        a[i + j] = (u + v);
        a[i + j + len / 2] = (u - v);
        ind += add;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
void mul_big_mod(vector<long long>& a, vector<long long>& b, long long mod) {
  int n1 = a.size(), n2 = b.size();
  int final_size = a.size() + b.size() - 1;
  int n = 1;
  while (n < final_size) n <<= 1;
  vector<base> P(n), Q(n);
  int SQRTMOD = (int)sqrt(mod) + 10;
  for (int i = 0; i < n1; i++) P[i] = base(a[i] % SQRTMOD, a[i] / SQRTMOD);
  for (int i = 0; i < n2; i++) Q[i] = base(b[i] % SQRTMOD, b[i] / SQRTMOD);
  fft(P, 0);
  fft(Q, 0);
  base A1, A2, B1, B2, X, Y;
  for (int i = 0; i < n; i++) {
    X = P[i];
    Y = P[(n - i) % n].conj();
    A1 = (X + Y) * base(0.5, 0);
    A2 = (X - Y) * base(0, -0.5);
    X = Q[i];
    Y = Q[(n - i) % n].conj();
    B1 = (X + Y) * base(0.5, 0);
    B2 = (X - Y) * base(0, -0.5);
    P1[i] = A1 * B1 + A2 * B2 * base(0, 1);
    Q1[i] = A1 * B2 + A2 * B1;
  }
  for (int i = 0; i < n; i++) P[i] = P1[i], Q[i] = Q1[i];
  fft(P, 1);
  fft(Q, 1);
  a.resize(final_size);
  for (int i = 0; i < final_size; i++) {
    long long x = (long long)(P[i].real() + 0.5);
    long long y = (long long)(P[i].imag() + 0.5) % mod;
    long long z = (long long)(Q[i].real() + 0.5);
    a[i] = (x + ((y * SQRTMOD + z) % mod) * SQRTMOD) % mod;
  }
}
const int N = 2e5 + 10, mod = 1e9 + 7;
int fact[N], invfact[N];
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int sub(int x, int y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline int mul(int x, int y) { return (((long long)x) * y) % mod; }
inline int powr(int a, long long b) {
  int x = 1 % mod;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a) { return powr(a, mod - 2); }
void pre() {
  fact[0] = invfact[0] = 1;
  for (int i = 1; i < N; i++) fact[i] = mul(i, fact[i - 1]);
  invfact[N - 1] = inv(fact[N - 1]);
  for (int i = N - 2; i >= 1; i--) invfact[i] = mul(invfact[i + 1], i + 1);
  assert(invfact[1] == 1);
}
inline int C(int n, int k) {
  if (n < k || k < 0) return 0;
  return mul(fact[n], mul(invfact[k], invfact[n - k]));
}
int stirling(int n, int k) {
  if (k > n) return 0;
  vector<long long> poly1(n + 1), poly2(n + 1);
  for (int j = 0; j <= n; j++) {
    poly1[j] = mul(powr(j, n), invfact[j]);
    poly2[j] = invfact[j];
    if (j & 1) poly2[j] = sub(0, poly2[j]);
  }
  mul_big_mod(poly1, poly2, mod);
  return poly1[k];
}
int main() {
  pre();
  precompute_powers();
  int n, k;
  scanf("%d %d", &n, &k);
  int W = 0, w;
  for (int i = 1; i <= n; i++) scanf("%d", &w), W = add(W, w);
  printf("%d\n", mul(W, add(stirling(n, k), mul(n - 1, stirling(n - 1, k)))));
}
