func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 100;   int n, k[N];   double p[N], p_log[N], p_log_1[N];   priority_queue<pair<double, int>> s;   inline double P(int i, int k) {     double x = pow(p[i], k);     if (x > 1e-6) return log(1 - x);     x = -x;     return x - x * x / 2 + x * x * x / 3;   }   void add(int i) { s.push(make_pair(P(i, k[i] + 1) - P(i, k[i]), i)); }   int main() {     ios_base::sync_with_stdio(0), cin.tie(0);     cin >> n;     if (n == 1) {       puts( 1 );       return 0;     }     for (int i = 0; i < (int)(n); i++) {       int a;       cin >> a;       p[i] = 1 - a * 1e-2;       p_log[i] = log(p[i]);       p_log_1[i] = log(1 - p[i]);     }     double sum = 0;     int cnt = n;     for (int i = 0; i < (int)(n); i++) sum += P(i, k[i] = 1);     double res = exp(sum) * cnt;     for (int i = 0; i < (int)(n); i++) add(i);     while (cnt <= 1e6) {       cnt++;       int i = s.top().second;       s.pop();       sum -= P(i, k[i]);       double x = cnt * exp(sum + p_log[i] * k[i]) * (1 - p[i]);       res += x;       sum += P(i, ++k[i]);       add(i);     }     printf( %.15f n , (double)res);     fprintf(stderr,  time = %.2f, cnt = %d n , 1. * clock() / CLOCKS_PER_SEC,             cnt);     return 0;   }   