#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
template <typename T, typename TT>
ostream &operator<<(ostream &s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, vector<T> t) {
  for (int(i) = 0; (i) < (((int)((t).size()))); ++(i)) s << t[i] << " ";
  return s;
}
const int DIGITS = 6, BASE = 1000000;
struct bignum : public vector<int> {
  bignum() { push_back(0); }
  bignum(long long num) {
    if (num < BASE)
      push_back(num);
    else
      while (num > 0) {
        push_back(num % BASE);
        num /= BASE;
      }
  }
  bignum(const string &s) {
    for (int i = 0; i < ((int)((s).size())); i += DIGITS) {
      int kon = ((int)((s).size())) - i, pocz = max(0, kon - DIGITS);
      push_back(atoi(s.substr(pocz, kon - pocz).c_str()));
    }
    cut0();
  }
  string str() const {
    stringstream ss;
    ss << back() << setfill('0');
    for (int i = int(size()) - 2; i >= 0; --i) ss << setw(DIGITS) << at(i);
    return ss.str();
  }
  bignum &operator+=(const bignum &y) {
    int maxsz = max(int(size()), ((int)((y).size())));
    bool carry = 0;
    for (int(i) = 0; (i) < (maxsz); ++(i)) {
      int sum = carry + (i < int(size()) ? at(i) : 0) +
                (i < ((int)((y).size())) ? y[i] : 0);
      if (sum >= BASE) {
        carry = 1;
        sum -= BASE;
      } else {
        carry = 0;
      }
      if (i < int(size()))
        at(i) = sum;
      else
        push_back(sum);
    }
    if (carry) push_back(1);
    return *this;
  }
  void cut0() {
    while (size() > 1 && back() == 0) pop_back();
  }
  bignum operator*(const bignum &y) const {
    vector<long long> w(size() + ((int)((y).size())) + 2, 0);
    for (int(i) = 0; (i) < (int(size())); ++(i))
      for (int(j) = 0; (j) < (((int)((y).size()))); ++(j))
        w[i + j] += (long long)at(i) * y[j];
    long long carry = 0;
    for (int(i) = 0; (i) < (((int)((w).size()))); ++(i)) {
      w[i] += carry;
      carry = w[i] / BASE;
      w[i] %= BASE;
    }
    bignum res;
    res.resize(((int)((w).size())));
    for (int(i) = 0; (i) < (((int)((w).size()))); ++(i)) res[i] = w[i];
    res.cut0();
    return res;
  }
  bignum &operator-=(const bignum &y) {
    for (int(i) = 0; (i) < (int(size())); ++(i)) {
      if (i < ((int)((y).size()))) at(i) -= y[i];
      if (at(i) < 0) {
        at(i) += BASE;
        at(i + 1) -= 1;
      }
    }
    cut0();
    return *this;
  }
  int compare(const bignum &y) const {
    if (int(size()) < ((int)((y).size()))) return -1;
    if (int(size()) > ((int)((y).size()))) return 1;
    for (int i = size() - 1; i >= 0; --i)
      if (at(i) != y[i]) {
        if (at(i) < y[i])
          return -1;
        else
          return 1;
      }
    return 0;
  }
  int operator%(int m) const {
    long long w = back() % m;
    for (int i = size() - 2; i >= 0; --i) w = (w * BASE + at(i)) % m;
    return w;
  }
  bignum &operator/=(int y) {
    long long dz = 0;
    for (int i = size() - 1; i >= 0; --i) {
      long long x = dz * BASE + at(i);
      at(i) = x / y;
      dz = x % y;
    }
    cut0();
    return *this;
  }
  bool operator<(const bignum &y) const { return compare(y) < 0; }
  bool operator>(const bignum &y) const { return compare(y) > 0; }
  bool operator<=(const bignum &y) const { return compare(y) <= 0; }
  bool operator>=(const bignum &y) const { return compare(y) >= 0; }
  bool operator==(const bignum &y) const { return compare(y) == 0; }
  bool operator!=(const bignum &y) const { return compare(y) != 0; }
  bignum operator+(const bignum &y) const {
    bignum res = *this;
    res += y;
    return res;
  }
  bignum operator-(const bignum &y) const {
    bignum res = *this;
    res -= y;
    return res;
  }
  bignum &operator*=(const bignum &y) { return *this = *this * y; }
  bignum operator/(int y) const {
    bignum res = *this;
    res /= y;
    return res;
  }
};
ostream &operator<<(ostream &s, const bignum &y) { return s << y.str(); }
int c[2048][2048];
bignum b[2048];
int main() {
  int(n), (k);
  scanf("%d %d", &(n), &(k));
  for (int(i) = 1; (i) <= (n); ++(i))
    for (int(j) = 1; (j) <= (n); ++(j)) {
      if (i < j)
        scanf("%d", &c[i][j]);
      else if (i == j)
        c[i][j] = -1;
      else
        c[i][j] = c[j][i];
    }
  b[k - 1] = 1;
  for (int(j) = (1); (j) <= (k - 1); ++j) b[k - 1] *= j;
  for (int(j) = (k); (j) <= (n - 2); ++j) b[j] = (b[j - 1] * j) / (j - k + 1);
  bignum suma = 0;
  for (int(s) = 1; (s) <= (n); ++(s)) {
    int deg = 0;
    long long wg = 0;
    for (int(j) = 1; (j) <= (n); ++(j))
      if (c[s][j] != -1) {
        ++deg;
        wg += c[s][j];
      }
    if (deg >= k) {
      suma += b[deg - 1] * wg;
    }
  }
  suma *= k;
  bignum dziel = 1;
  for (int(j) = (0); (j) <= (k - 1); ++j) dziel *= n - j;
  long long from = 1, to = 1LL << 60, best = 0;
  while (from <= to) {
    long long r = (from + to) / 2;
    if (dziel * r <= suma) {
      best = r;
      from = r + 1;
    } else
      to = r - 1;
  }
  cout << best;
}
