#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
int n, k;
int g[maxn][maxn];
double c[maxn][maxn];
void init() {
  memset(g, -1, sizeof g);
  for (int i = 0; i < maxn; i++) {
    c[i][0] = c[i][i] = 1;
    for (int j = 1; j < i; j++) {
      c[i][j] = c[i - 1][j - 1] + c[i - 1][j];
    }
  }
}
int main() {
  init();
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      scanf("%d", &g[i][j]);
      g[j][i] = g[i][j];
    }
  }
  double ans = 0;
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    double sum = 0;
    for (int j = 1; j <= n; j++) {
      if (g[i][j] == -1) continue;
      cnt++;
      sum += g[i][j];
    }
    if (cnt >= k) ans += c[cnt - 1][k - 1] * sum;
  }
  ans /= c[n][k];
  printf("%lld\n", (long long)ans);
  return 0;
}
