#include <bits/stdc++.h>
using namespace std;
int N, n, mx = -(1e9) - 7, mn = (1e9) + 7;
int main()
{
cin >> N;
for(int i = 0; i < N; i++)
{
cin >> n;
mx = max(mx, n);
mn = min(mn, n);
}
printf("%d\n", mx - mn);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
3 |
Incorrect |
6 ms |
256 KB |
Output isn't correct |
4 |
Incorrect |
6 ms |
256 KB |
Output isn't correct |
5 |
Incorrect |
59 ms |
376 KB |
Output isn't correct |
6 |
Incorrect |
62 ms |
256 KB |
Output isn't correct |
7 |
Incorrect |
61 ms |
256 KB |
Output isn't correct |