#include <bits/stdc++.h>
using namespace std;
const int SIZEN = 2010;
long double C(int n, int m) {
  long double ans = 1;
  for (int i = 0; i < m; i++) {
    ans *= n - i;
    ans /= m - i;
  }
  return ans;
}
int N, K;
long long c[SIZEN][SIZEN] = {0};
void work(void) {
  long double ans = 0;
  for (int i = 1; i <= N; i++) {
    int snum = 0;
    long double ssum = 0;
    for (int j = 1; j <= N; j++) {
      if (c[i][j] != -1) {
        snum++;
        ssum += c[i][j];
      }
    }
    if (snum >= K) {
      ans += C(snum - 1, K - 1) * ssum;
    }
  }
  ans /= C(N, K);
  cout << (long long)(ans + 1e-6) << endl;
}
void read(void) {
  scanf("%d%d", &N, &K);
  for (int i = 1; i <= N; i++) {
    c[i][i] = -1;
    for (int j = i + 1; j <= N; j++) {
      scanf("%I64d", &c[i][j]);
      c[j][i] = c[i][j];
    }
  }
}
int main() {
  read();
  work();
  return 0;
}
