//我一开始是一直用的sort,但还是不对,后来才发现不能用printf(.3lf\n,t),要用cout.setf(ios::fixed);
cout.precision(3);
cout << q.top() << endl;,吸取教训!!!!
#include<iostream>
#include<queue>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
priority_queue<double> q;
int n;
double a,b,t;
while(cin>>n){
for(int i = 0;i<n;++i){
cin>>t;
q.push(t);
}
while(q.size()>1){
a = q.top();
q.pop();
b = q.top();
q.pop();
t = 2*sqrt(a*b);
q.push(t);
}
cout.setf(ios::fixed);
cout.precision(3);
cout << q.top() << endl;
}
return 0;
}