func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, T;   const int mn = 5009;   double p[mn];   double p2[102][mn];   int pi[mn];   int t[mn];   double dp[2][mn];   int main() {     scanf( %d , &(n));     scanf( %d , &(T));     int pk;     for (int i = 0; i < n; i++) {       scanf( %d %d , &pi[i], &t[i]);       p[i] = pi[i] / 100.0;     }     for (int i = 0; i <= 100; i++) {       p2[i][0] = 1;       for (int j = 1; j <= T; j++) {         p2[i][j] = (i / 100.0) * p2[i][j - 1];       }     }     int la = 0;     double r1 = 0;     double r2 = 0;     int i2;     int i12;     for (int i = n - 1; i >= 0; i--) {       la = 0;       r1 = 0;       r2 = 0;       i2 = i % 2;       i12 = (i + 1) % 2;       for (int w = 1; w <= T; w++) {         r1 = (r1) * (1 - p[i]) + dp[i12][w - 1] + 1;         while (w - la >= t[i]) {           r1 = r1 - (1 + dp[i12][la]) * p2[100 - pi[i]][t[i] - 1];           la++;         }         r2 = r1 * p[i];         if (w - t[i] >= 0) {           r2 = r2 + (dp[i12][w - t[i]] + 1) * p2[100 - pi[i]][t[i] - 1];         }         dp[i2][w] = r2;       }     }     printf( %.10lf n , dp[0][T]);     return 0;   }   