func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, T;   int t[5005];   double p[5005];   double f[5005][5005];   double res;   double fastpow(double a, int b) {     if (!b) return 1;     double res = fastpow(a, b / 2);     if (b % 2) return res * res * a;     return res * res;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n >> T;     for (int i = 1; i <= n; i++) {       cin >> p[i] >> t[i];       p[i] = (1 - p[i] / 100.0);     }     f[0][0] = 1;     for (int i = 1; i <= n; i++) {       double pw = fastpow(p[i], t[i] - 1);       for (int j = 1; j <= T; j++) {         double s = f[i][j - 1];         s = f[i][j - 1];         if (j - 1 >= t[i]) s -= f[i - 1][j - t[i] - 1] * pw;         s *= p[i];         if (j >= t[i]) s += f[i - 1][j - t[i]] * pw * p[i];         s += f[i - 1][j - 1] * (1 - p[i]);         res += s;         f[i][j] = s;       }     }     cout << setprecision(10) << fixed << res <<   n ;     return 0;   }   