mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
17 lines
333 B
C
17 lines
333 B
C
#include<stdio.h>
|
|
|
|
int main(int argc, char* argv[]){
|
|
long min = 999999999,max = -min;
|
|
long cnt;
|
|
scanf("%li", &cnt);
|
|
while(cnt--){
|
|
auto long i;
|
|
scanf("%li", &i);
|
|
min = i >= min ? min : i;
|
|
max = i <= max ? max : i;
|
|
}
|
|
printf("%li %li", min, max);
|
|
// while(1);
|
|
return 0;
|
|
}
|