제출 #1011248

#제출 시각아이디문제언어결과실행 시간메모리
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]); }

컴파일 시 표준 에러 (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...