#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>
#define MAXN 100
using namespace std; double _m[MAXN]; double fun(); int n; int main()
{
//freopen("acm.acm","r",stdin); int i;
cin>>n;
for(i = ; i < n; ++ i)
{
cin>>_m[i];
} double tem = fun(); for(i = ; i < n; ++ i)
{
tem = *sqrt(fun()*tem);
}
cout<<setiosflags(ios::fixed)<<setprecision()<<tem<<endl;
} double fun()
{
int i;
double max = -;
int index;
for(i = ; i < n; ++ i)
{
if(_m[i] > max)
{
max = _m[i];
index = i;
}
}
_m[index] = -;
return max;
}
关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。
技术网站地址: vmfor.com