답안 #594429

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
594429 2022-07-12T12:32:20 Z daisy2 Prosjek (COCI18_prosjek) C++14
50 / 50
1 ms 212 KB
#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
int n;
double a[50];
int main()
{
    cout<<fixed<<setprecision(6)<<endl;
    cin>>n;

    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    sort(a,a+n);

    double pr=a[0];
    for(int i=1;i<n;i++)
    {
        pr=(pr+a[i])/2;
    }
 cout<<pr<<endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct