func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1010;   int dp[N], c[N];   long long ncr[N][N];   void pascal() {     ncr[0][0] = 1;     for (int i = 1; i < N; i++) {       ncr[i][0] = 1;       for (int j = 1; j <= i; j++) {         ncr[i][j] = (ncr[i - 1][j] + ncr[i - 1][j - 1]) % 1000000007;       }     }   }   int main() {     pascal();     int k;     cin >> k;     for (int i = 0; i < (int)(k); ++i) cin >> c[i];     long long res = 1, total = 0;     for (int i = 0; i < (int)(k); ++i) {       res = (res * ncr[(total + c[i] - 1)][c[i] - 1]) % 1000000007;       total += c[i];     }     cout << res << endl;   }   