#include #include using namespace std; double binomialCoefficients(double alpha, int k); int main() { int N; cin >> N; double x_i[N]; for(int i = 0; i < N; i++){ cin >> x_i[i]; if(x_i[i] > 1) x_i[i] = 1/x_i[i]; double result = 0; for(int j = 0; j < 100; j++){ double buff = 0; for(int k = 0; k < i; k++ ) buff += pow(x_i[k] - 1, j); result += binomialCoefficients(0.5, j) * buff; } cout << result << endl; } return 0; } double binomialCoefficients(double alpha, int k){ double result = 1; for(int i = 0; i < k; i++) result *= (alpha - k)/(k + 1); return result; }