답안 #207437

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
207437 2020-03-07T14:19:31 Z ThegeekKnight16 Prosjek (COCI18_prosjek) C++14
50 / 50
6 ms 376 KB
#include <bits/stdc++.h>
using namespace std;
vector<float> v;

int main()
{

	ios_base::sync_with_stdio(false);
  cin.tie(NULL);
	int N;
	cin >> N;
	for (int i = 0; i < N; i++)
	{
		float Numb;
		cin >> Numb;
		v.push_back(Numb);
	}
	sort(v.begin(),v.end());
	float Media = 0.0;
	Media = (v[0] + v[1]) / 2;
	for (int i = 2; i < N; i++)
	{
		Media = (Media + v[i]) / 2;
	}
	cout << Media;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 6 ms 376 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
5 Correct 5 ms 376 KB Output is correct
6 Correct 5 ms 376 KB Output is correct
7 Correct 5 ms 376 KB Output is correct
8 Correct 5 ms 376 KB Output is correct
9 Correct 5 ms 376 KB Output is correct
10 Correct 5 ms 376 KB Output is correct