#include <bits/stdc++.h>
using namespace std;
int deg[2111];
long long sum[2111];
long double fac[2111];
void pre() {
  fac[0] = fac[1] = 0;
  for (int i = 2; i < 2111; i++) fac[i] = fac[i - 1] + logl(i);
}
long double C(int n, int k) { return fac[n] - fac[k] - fac[n - k]; }
int main() {
  pre();
  int N, K, a;
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      scanf("%d", &a);
      if (a >= 0) {
        deg[i]++, sum[i] += a;
        deg[j]++, sum[j] += a;
      }
    }
  }
  long double ans = 0;
  for (int i = 0; i < N; i++) {
    if (deg[i] >= K) {
      long double mid = C(deg[i] - 1, K - 1) + logl(sum[i]);
      mid -= C(N, K);
      ans += expl(mid);
    }
  }
  cout << (long long)(ans + 1e-7) << endl;
  return 0;
}
