Submission #87828

#TimeUsernameProblemLanguageResultExecution timeMemory
87828AntonioDakiProsjek (COCI18_prosjek)C++14
50 / 50
3 ms708 KiB
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, x[22]; double m; cin >> n; for(int i = 0; i < n; ++i) cin >> x[i]; sort(x, x + n); m = x[0]; for(int i = 1; i < n; ++i) m = (m + x[i]) / 2; cout << m; return 0; }

Compilation message (stderr)

prosjek.cpp: In function 'int main()':
prosjek.cpp:17:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i = 1; i < n; ++i)
     ^~~
prosjek.cpp:19:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  cout << m;
  ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...