#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n, k, g[2005][2005];
long double C[2005][2005];
void solve() {
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    long double w = 0;
    int d = 0;
    for (int j = 0; j < n; j++) {
      if (g[i][j] != -1) {
        w += g[i][j];
        d++;
      }
    }
    if (d >= k) {
      ans += C[d - 1][k - 1] * w;
    }
  }
  ans /= C[n][k];
  long long res = ans;
  cout << res << endl;
}
int main() {
  C[0][0] = 1;
  for (int i = 1; i < 2005; i++) {
    for (int j = 0; j <= i; j++) {
      C[i][j] = C[i - 1][j] + (j ? C[i - 1][j - 1] : 0);
    }
  }
  cin.sync_with_stdio(false);
  while (cin >> n >> k) {
    for (int i = 0; i < n; i++) {
      g[i][i] = -1;
      for (int j = i + 1; j < n; j++) {
        cin >> g[i][j];
        g[j][i] = g[i][j];
      }
    }
    solve();
  }
}
