Submission #207437

#TimeUsernameProblemLanguageResultExecution timeMemory
207437ThegeekKnight16Prosjek (COCI18_prosjek)C++14
50 / 50
6 ms376 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...