#include <bits/stdc++.h>
using namespace std;
void exgcd(int a, int b, int& d, int& x, int& y) {
  if (!b)
    d = a, x = 1, y = 0;
  else {
    exgcd(b, a % b, d, y, x);
    y -= (a / b) * x;
  }
}
int inv(int a, int n) {
  int d, x, y;
  exgcd(a, n, d, x, y);
  return (x < 0) ? (x + n) : (x);
}
int qpow(int a, int pos, int m) {
  int rt = 1, pa = a;
  for (; pos; pos >>= 1, pa = pa * 1ll * pa % m)
    if (pos & 1) rt = rt * 1ll * pa % m;
  return rt;
}
const int M = 1e9 + 7;
int n, k;
int sum = 0;
inline void init() {
  scanf("%d%d", &n, &k);
  for (int i = 1, x; i <= n; i++) scanf("%d", &x), sum = (sum + x) % M;
}
inline int Striling(int n, int k) {
  int rt = 0, sign = 1, C = 1, P = 1;
  for (int i = 0; i < k; i++, sign = -sign) {
    if (i) C = (C * 1ll * inv(i, M) % M) * (k - i + 1) % M;
    rt = (rt + sign * ((qpow(k - i, n, M) * 1ll * C) % M) + M) % M;
  }
  for (int i = 2; i <= k; i++) P = (P * 1ll * i) % M;
  return rt * 1ll * inv(P, M) % M;
}
int res = 0;
inline void solve() {
  res = (Striling(n, k) + (n - 1) * 1ll * Striling(n - 1, k)) % M;
  res = res * 1ll * sum % M;
  printf("%d", res);
}
int main() {
  init();
  solve();
  return 0;
}
