#include <bits/stdc++.h>
using namespace std;
int n, k, d[2000 + 5];
double c[2000 + 5][2000 + 5], sum[2000 + 5], ans = 0;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      int x;
      scanf("%d", &x);
      if (x == -1) continue;
      d[i]++, d[j]++, sum[i] += x, sum[j] += x;
    }
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= i; j++) {
      if (!i) c[i][j] = 1;
      if (i) c[i][j] += c[i - 1][j];
      if (j) c[i][j] += c[i - 1][j - 1];
    }
  for (int i = 1; i <= n; i++)
    if (d[i] >= k - 1) ans += sum[i] * c[d[i] - 1][k - 1];
  ans /= c[n][k], ans -= 0.5;
  if (ans < 0) ans = 0;
  printf("%.0lf\n", ans);
  return 0;
}
