zoukankan      html  css  js  c++  java
  • poj1862

    简单题

    View Code
    #include <iostream>
    #include <cstdlib>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <cmath>
    using namespace std;
    
    #define maxn 105
    
    int n;
    int f[maxn];
    
    int main()
    {
        //freopen("t.txt", "r", stdin);
        scanf("%d", &n);
        for (int i = 0; i < n; i++)
            scanf("%d", &f[i]);
        sort(f, f + n);
        double ans = f[n - 1];
        for (int i = n - 2; i >= 0; i--)
            ans = 2 * sqrt(ans * f[i]);
        printf("%.3f\n", ans);
    }
  • 相关阅读:
    @bzoj
    @bzoj
    @codeforces
    @codeforces
    @bzoj
    @codeforces
    @codeforces
    @codeforces
    @NOIP2018
    反转字符串--C和Python
  • 原文地址:https://www.cnblogs.com/rainydays/p/2964857.html
Copyright © 2011-2022 走看看