func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:1024000000,1024000000 )   using namespace std;   double dp[5010], f[5010];   int main() {     int T, i, j, k, ca = 0, n, m;     while (~scanf( %d%d , &n, &T)) {       for (i = 0; i <= T; i++) dp[i] = 0;       dp[0] = 1;       double ans = 0;       for (i = 0; i < n; i++) {         int p1, t;         scanf( %d%d , &p1, &t);         double p = 1. * p1 / 100, q = 1;         for (j = 1; j < t; j++) q *= (1 - p);         f[0] = dp[0];         for (j = 1; j <= T; j++) f[j] = f[j - 1] * (1 - p) + dp[j];         for (j = T; j >= 1; j--) {           double c = 0;           if (j >= t) c = f[j - t];           dp[j] = (f[j - 1] - c * q) * p;           if (j >= t) dp[j] += q * dp[j - t];         }         dp[0] = 0;         for (j = 1; j <= T; j++) ans += dp[j];       }       printf( %lf n , ans);     }   }   