#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2010;
long long n, k;
long long mp[maxn][maxn], fac[maxn];
double ans;
double C(long long n, long long m) {
  double ans = 1;
  for (register long long i = 0; i < m; ++i) {
    ans *= n - i;
    ans /= m - i;
  }
  return ans;
}
inline void solve() {
  for (register long long i = 1; i <= n; ++i) {
    double sum = 0;
    long long cnt = 0;
    for (register long long j = 1; j <= n; ++j) {
      if (mp[i][j] != -1) {
        cnt++;
        sum += mp[i][j];
      }
    }
    if (cnt >= k) ans += C(cnt - 1, k - 1) * sum;
  }
  ans /= C(n, k);
  cout << (long long)(ans + 1e-6) << endl;
}
int main() {
  scanf("%lld%lld", &n, &k);
  for (register long long i = 1; i <= n; ++i) {
    mp[i][i] = -1;
    for (register long long j = i + 1; j <= n; ++j) {
      scanf("%lld", &mp[i][j]);
      mp[j][i] = mp[i][j];
    }
  }
  solve();
  return 0;
}
