#include <bits/stdc++.h>
using namespace std;
long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
const long long maxn = 2e3 + 10;
long long n, m, k;
const long long mod = 1e9 + 9;
long double c[maxn][maxn];
long long g[maxn][maxn];
long double res;
long double tot;
int32_t main() {
  long long n = in(), k = in();
  for (long long i = 0; i < maxn; i++)
    for (long long j = 0; j <= i; j++)
      c[i][j] = j == 0 ? 1 : c[i - 1][j] + c[i - 1][j - 1];
  memset(g, -1, sizeof g);
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      g[i][j] = g[j][i] = in();
    }
  }
  for (long long i = 0; i < n; i++) {
    long long cnt = 0, sum = 0;
    for (long long j = 0; j < n; j++)
      if (g[i][j] + 1) cnt++, sum += g[i][j];
    if (cnt >= k) {
      res += (long double)c[cnt - 1][k - 1] * sum;
      tot += c[cnt][k];
    }
  }
  cout << (long long)(res / tot) << endl;
}
