#include <bits/stdc++.h>
using namespace std;
double res = 0;
long long A[2005][2005], ctos, b, cuenta;
long long suma, pon;
long long bino(long long uno, long long dos) {
  if (dos == 1) return uno;
  if (dos == 2) return uno * (uno - 1) / 2;
  if (uno == dos) return 1;
  return uno;
}
int main() {
  scanf("%I64d%I64d", &ctos, &b);
  for (long long i = 1; i <= ctos; i++) {
    A[i][i] = -1;
    for (long long e = i + 1; e <= ctos; e++) {
      scanf("%I64d", &A[e][i]);
      A[i][e] = A[e][i];
    }
  }
  for (long long i = 1; i <= ctos; i++) {
    cuenta = 0;
    suma = 0;
    for (long long e = 1; e <= ctos; e++) {
      if (A[e][i] >= 0) {
        ++cuenta;
        suma += A[e][i];
      }
    }
    if (cuenta >= b) {
      res += double(bino(cuenta, b) * b / cuenta * suma) / bino(ctos, b);
    }
  }
  pon = res;
  printf("%I64d\n", pon);
  return 0;
}
