#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long double n, k;
  cin >> n >> k;
  vector<long double> wlk(n, 0.0), sum(n, 0.0);
  for (int i = 0; i < n - 1; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int x;
      cin >> x;
      if (x != -1) {
        ++wlk[i];
        ++wlk[j];
        sum[i] += (long double)x;
        sum[j] += (long double)x;
      }
    }
  }
  long double odp = 0.0;
  vector<vector<long double> > C(n + 1, vector<long double>(n + 1));
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (j == 0 || j == i)
        C[i][j] = 1.0;
      else
        C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
    }
  }
  for (int i = 0; i < n; ++i) odp += C[wlk[i] - 1][k - 1] * sum[i];
  odp /= C[n][k];
  cout << (long long)odp;
  return 0;
}
