# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
603287 | 2022-07-23T21:31:03 Z | LucaGreg | Prosjek (COCI18_prosjek) | C++17 | 1 ms | 304 KB |
#include <bits/stdc++.h> using namespace std; vector<int> v; int main() { int n; scanf("%d", &n); for(int i=0;i<n;i++){ int vi; scanf("%d", &vi); v.push_back(vi); } sort(v.begin(), v.end()); double m = v[0]; for(int i=1;i<=n-1;i++){ m = (m + v[i])/2; } printf("%f", m); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 296 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 304 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |