#include <bits/stdc++.h>
using namespace std;
long long int a[2001][2001], sum[2001], deg[2001];
int main() {
  long long int i, n, k, j, x, s = 0;
  for (i = 0; i <= 2000; i++) {
    a[i][0] = 1;
    a[i][1] = i;
    a[i][i] = 1;
    for (j = 2; j < i; j++) {
      a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
    }
  }
  scanf("%lld %lld", &n, &k);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      scanf("%lld", &x);
      if (x > -1) {
        deg[i]++;
        deg[j]++;
        sum[i] += x;
        sum[j] += x;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (deg[i] >= k) {
      s += sum[i] * a[deg[i] - 1][k - 1];
    }
  }
  cout << s / a[n][k] << endl;
}
