#include <bits/stdc++.h>
using namespace std;
long double C(int n, int k) {
  long double res = 1;
  for (int i = 1; i <= k; ++i) res = res * (n - k + i) / i;
  return res;
}
vector<unsigned long long> g[2001];
int main() {
  cin.sync_with_stdio(false);
  int i, n, k;
  cin >> n >> k;
  for (i = 0; i < (n - 1); ++i) {
    int j;
    for (j = (i + 1); j < (n); ++j) {
      int c;
      cin >> c;
      if (c >= 0) {
        g[i].push_back(c);
        g[j].push_back(c);
      }
    }
  }
  long double s = 0;
  for (i = 0; i < (n); ++i) {
    long double c = C(g[i].size() - 1, k - 1);
    int j;
    for (j = 0; j < (g[i].size()); ++j) s += g[i][j] * c;
  }
  cout << (unsigned long long)(s / C(n, k)) << endl;
  return 0;
}
