func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 5;   int n;   double p[maxn], dp[maxn];   int main() {     scanf( %d , &n);     for (int i = 0; i < n; i++) scanf( %lf , &p[i]);     double sol = 0.;     dp[0] = 0;     for (int i = 1; i < n; i++) {       dp[i] = (dp[i - 1] + p[i - 1]) * p[i];       sol += 2. * dp[i];     }     for (int i = 0; i < n; i++) sol += p[i];     printf( %.9lf n , sol);     return 0;   }   