#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, in[2010];
double s, sum[2010], C[2010][2010];
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n - 1; i++)
    for (j = i + 1; j <= n; j++) {
      scanf("%d", &k);
      if (k > -1) in[i]++, in[j]++, sum[i] += k, sum[j] += k;
    }
  for (i = 0; i <= n; i++) {
    C[i][0] = 1;
    for (j = 1; j <= i; j++) C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
  }
  for (i = 1; i <= n; i++)
    if (in[i] >= m) s += sum[i] * C[in[i] - 1][m - 1];
  s /= C[n][m];
  printf("%I64d\n", (long long)floor(s + 1e-10));
  return 0;
}
