func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 100005, P = 1e9 + 7;   int n, s, ans, c[N], f[N];   inline int pw(int a, int b) {     int r = 1;     for (; b; b >>= 1, a = 1ll * a * a % P)       if (b & 1) r = 1ll * r * a % P;     return r;   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d , &c[i]), s += c[i];     f[1] = 1ll * (s - 1) * (s - 1) % P * pw(s, P - 2) % P;     for (int i = 1; i < 100000; i++)       f[i + 1] = ((2 * f[i] % P - f[i - 1] + P) % P -                   1ll * (s - 1) * pw(s - i, P - 2) % P + P) %                  P;     for (int i = 1; i <= n; i++) ans = (ans + f[c[i]]) % P;     printf( %d n , ans);     return 0;   }   