#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000000")
using namespace std;
const long long int INF = 2e15;
int ma[5000][5000], sc[5000];
long double temp[5000];
int main() {
  long long int n, p, k;
  cin >> n >> k;
  temp[n] = 1.0 / n;
  long double te = n;
  for (long long int i = n - 1; i >= k; i--) {
    temp[i] = temp[i + 1] / (te - 1) * (te - k);
    te--;
  }
  memset(ma, -1, sizeof ma);
  memset(sc, 0, sizeof sc);
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 1; j < n; j++) {
      scanf("%d", &ma[i][j]);
      ma[j][i] = ma[i][j];
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < n; j++) {
      if (ma[i][j] == -1) continue;
      sc[i]++;
    }
  }
  long double res = 0;
  for (long long int i = 0; i < n; i++) {
    if (sc[i] < k) continue;
    for (long long int j = 0; j < n; j++) {
      if (ma[i][j] != -1) {
        res += ma[i][j] * k * temp[sc[i]];
      }
    }
  }
  long long int a = res;
  if ((long double)a + 1 - res < 1e-6) a++;
  cout << a;
}
