#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
int n, k;
int deg[MAXN];
long long sum[MAXN];
long long tot[MAXN];
long double ans;
int main() {
  scanf("%d%d", &n, &k);
  for (int w, i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      scanf("%d", &w);
      if (~w) {
        deg[i]++;
        deg[j]++;
        sum[i] += w;
        sum[j] += w;
      }
    }
  for (int i = 1; i <= n; i++) tot[deg[i]] += sum[i];
  for (int i = k; i < n; i++) {
    long double val = (long double)k / (n - k + 1);
    for (int j = 0; j < k - 1; j++) val *= (long double)(i - 1 - j) / (n - j);
    ans += val * tot[i];
  }
  printf("%lld\n", (long long)ans);
  return 0;
}
