func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = -1;   struct disk {     long long L;     double p;     disk(long long L = 0, double p = 0.) : L(L), p(p) {}   };   bool operator<(disk a, disk b) {     return (a.L * a.p * (1 - b.p)) > (b.L * b.p * (1 - a.p));   }   int n;   vector<disk> P;   int main() {     while (cin >> n) {       P.resize(n);       for (int i = (0); i < (int)(n); i++)         scanf( %lld %lf , &P[i].L, &P[i].p), P[i].p /= 100;       sort(P.begin(), P.end());       double ans = 0., E = 0.;       for (int i = ((int)n) - 1; i >= 0; i--) {         disk D = P[i];         ans += D.L * (1 + E * D.p);         E = D.p * E + (1 - D.p) * (E + 1);       }       printf( %.6f n , ans);     }     return 0;   }   