Submission #1011248

#TimeUsernameProblemLanguageResultExecution timeMemory
1011248sleepntsheepMean (info1cup19_mean)C11
0 / 100
0 ms344 KiB
#include <stdio.h> int main() { int n, a[205]; scanf("%d", &n); for (int i = 0; i < n; ++i) scanf("%d", a + i); for (int i = 1; i < n; ++i) for (int j = 1; j < n; ++j) if (a[j] < a[j - 1]) a[200] = a[j], a[j] = a[j - 1], a[j - 1] = a[200]; for (int i = 1; i < n; ++i) a[0] = (a[0] + a[i]) / 2; printf("%d", a[0]); }

Compilation message (stderr)

mean.c: In function 'main':
mean.c:4:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    4 |   scanf("%d", &n);
      |   ^~~~~~~~~~~~~~~
mean.c:6:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |     scanf("%d", a + i);
      |     ^~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...