#pragma region include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #pragma endregion //#include ///////// #define REP(i, x, n) for(int i = x; i < n; ++i) #define rep(i,n) REP(i,0,n) #define ALL(X) X.begin(), X.end() ///////// #pragma region typedef typedef long long LL; typedef long double LD; typedef unsigned long long ULL; typedef std::pair PLL;// typedef std::pair PII;// #pragma endregion //typedef ////定数 const int INF = (int)1e9; const LL MOD = (LL)1e9+7; const LL LINF = (LL)1e18+20; const double PI = acos(-1.0); const double EPS = 1e-9; ///////// using namespace::std; const double F_inf = 0.22943812449214490247015335107611; double F(int N){ double res = 0; for(int i=1;i<=N;++i){ res += pow(0.81,i); } double ans = 0; ans = sqrt( res ); res = 0; for(int i=1;i<=N;++i){ res += pow(0.9, i); } ans /= res; return ans; } double f(int N){ //double res1 = F(N)/F(1) * 1200; double res1 = (F(N)-F_inf)/(F(1)-F_inf) * 1200; return res1; } double g(double X){ return pow(2.0, X/800); } double g_inv(double Y){ double res = log(Y)/log(2.0) * 800; return res; } void solve(){ int N; cin >> N; vector RPerf(N+1); for(int i=1;i<=N;++i){ cin >> RPerf[i]; } double Y = 0; double res = 0; for(int i=1;i<=N;++i){ res += g(RPerf[i]) * pow(0.9,i); } double res2 = 0; for(int i=1;i<=N;++i){ res2 += pow(0.9, i); } Y = res/res2; double ans; ans = g_inv(Y) - f(N); cout << ans << endl; //cerr << f(2) << endl; } #pragma region main signed main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;//小数を10進数表示 cout << setprecision(16);//小数点以下の桁数を指定//coutとcerrで別 solve(); } #pragma endregion //main()