func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 510;   const int inf = 0x3f3f3f3f;   int n;   long long d[maxn][maxn];   int w(int i, int j, int k) { return i * j * k; }   int main() {     int n;     scanf( %d , &n);     memset(d, 0x3f, sizeof(d));     for (int i = 1; i <= n; i++) {       d[i][i + 2] = w(i, i + 1, i + 2);       d[i][i] = 0;       d[i][i + 1] = 0;     }     for (int i = n - 2; i >= 1; i--) {       for (int j = i + 2; j <= n; j++) {         for (int k = i + 1; k < j; k++) {           d[i][j] = min(d[i][j], d[i][k] + d[k][j] + w(i, j, k));         }       }     }     printf( %I64d , d[1][n]);     return 0;   }   