func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( Ofast ,  unroll-loops )   using namespace std;   const int MOD = 1e9 + 7;   const int MAXN = 1010;   const double EPS = 0.000001;   double A[MAXN], B[MAXN];   int n, m;   bool can(double X) {     for (int i = 0; i < n; i++) {       double W_li = m + X;       double TO = W_li / A[i];       if (TO > X) return false;       X -= TO;       double W_la = W_li - TO;       double LN = W_la / B[(i + 1) % n];       if (LN > X) return false;       X -= LN;     }     return true;   }   int main() {     cin >> n >> m;     for (int i = 0; i < n; i++) cin >> A[i] >> B[i];     double l = 0.0, r = 1e9 + 1;     double ans = 0.0;     bool flag = false;     while (l <= r) {       double mid = (l + r) / 2.0;       if (abs(r - l) < EPS) {         if (can(l)) {           ans = l;         } else if (can(r)) {           ans = r;         }         break;       }       if (can(mid)) {         flag = true;         ans = mid;         r = mid;       } else {         ans = mid;         l = mid;       }     }     if (flag)       cout << setprecision(20) << ans <<   n ;     else       cout << -1 <<   n ;     return 0;   }   