// In the name of god
// A.H.Ghaznavi
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n,a[30];
ld ans[30];
int main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n;
for (int i=0;i<n;i++)
cin>>a[i];
sort (a, a+n);
for (int i=0;i<n;i++)
ans[i]=a[i];
for (int i=0;i<n-1;i++)
ans[i+1]=(ans[i]+ans[i+1])/2;
cout.precision(10);
cout<<fixed<<ans[n-1];
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
248 KB |
Output is correct |
2 |
Correct |
3 ms |
360 KB |
Output is correct |
3 |
Correct |
2 ms |
472 KB |
Output is correct |
4 |
Correct |
3 ms |
712 KB |
Output is correct |
5 |
Correct |
3 ms |
812 KB |
Output is correct |
6 |
Correct |
2 ms |
812 KB |
Output is correct |
7 |
Correct |
3 ms |
812 KB |
Output is correct |
8 |
Correct |
2 ms |
812 KB |
Output is correct |
9 |
Correct |
2 ms |
812 KB |
Output is correct |
10 |
Correct |
3 ms |
812 KB |
Output is correct |