#include <bits/stdc++.h>
using namespace std;
long double C[2050][2050], sum[2050], ans;
int n, m, d[2050];
double Ans;
inline int Read() {
  int x = 0;
  char y;
  bool z = 0;
  do y = getchar(), z |= y == '-';
  while (y < '0' || y > '9');
  do x = x * 10 + y - '0', y = getchar();
  while (y >= '0' && y <= '9');
  return z ? -x : x;
}
int main() {
  n = Read();
  m = Read();
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      int k = Read();
      if (k == -1) continue;
      d[i]++;
      d[j]++;
      sum[i] += k;
      sum[j] += k;
    }
  for (int i = 0; i <= n; i++) C[i][0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i; j++) C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
  for (int i = 1; i <= n; i++) ans += sum[i] * C[d[i] - 1][m - 1];
  ans /= C[n][m];
  Ans = (double)ans - 0.5;
  if (Ans < 0) Ans = 0;
  printf("%.0lf\n", Ans);
  return 0;
}
