#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
long double nCr[N][N];
int mat[N][N], n, k;
int main() {
  for (int i = 0; i < N; ++i) nCr[i][i] = nCr[i][0] = 1;
  for (int i = 1; i < N; i++)
    for (int j = 1; j < i; j++) nCr[i][j] = nCr[i - 1][j] + nCr[i - 1][j - 1];
  cin >> n >> k;
  long double out = 0;
  for (int i = 0; i < n; ++i) {
    mat[i][i] = -1;
    for (int j = i + 1; j < n; j++)
      scanf("%d", &mat[i][j]), mat[j][i] = mat[i][j];
    int c = 0;
    for (int j = 0; j < n; ++j) c += (mat[i][j] != -1);
    if (c < k) continue;
    for (int j = 0; j < n; ++j)
      if (mat[i][j] != -1) out += mat[i][j] * nCr[c - 1][k - 1];
  }
  cout << (unsigned long long)(out / nCr[n][k]);
}
