func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, i, cnt;     double ans, a, dp[100005] = {0}, pr[100005] = {0};     cin >> n;     for (i = 1; i <= n; i++) {       cin >> a;       pr[i] = pr[i - 1] * a + a;       dp[i] = dp[i - 1] + a * (2 * pr[i - 1] + 1);     }     printf( %.15lf , dp[n]);     return 0;   }   