func_code_string: #include <bits/stdc++.h>   using namespace std;   int dx[] = {0, -1, 0, 1};   int dy[] = {1, 0, -1, 0};   int c[2010][2010], edge[2010];   long double s[2010], C[2010][2010];   int main(int argc, char *argv[]) {     int n, k;     scanf( %d%d , &n, &k);     for (int i = (1); i <= (n); ++i) {       C[i][0] = 1;       for (int j = (1); j <= (i); ++j) C[i][j] = C[i][j - 1] * (i - j + 1) / j;     }     for (int i = (1); i <= (n - 1); ++i)       for (int j = (i + 1); j <= (n); ++j) {         scanf( %d , &c[i][j]);         c[j][i] = c[i][j];       }     long double m = 0;     for (int i = (1); i <= (n); ++i) {       edge[i] = 0;       for (int j = (1); j <= (n); ++j)         if (c[i][j] >= 0 && i != j) edge[i]++;       s[i] = 0;       if (edge[i] < k) continue;       s[i] = C[edge[i]][k];       m += s[i];     }     long double ans = 0;     for (int i = (1); i <= (n); ++i) {       if (edge[i] <= 0) continue;       long double p = (s[i] * k) / (m * edge[i]);       long double sum = 0;       for (int j = (1); j <= (n); ++j)         if (c[i][j] >= 0 && i != j) sum += (long double)c[i][j];       ans += sum * p;     }     ans = ans + 1e-5;     printf( %I64d n , (long long)ans);     return 0;   }   