C-study/04/2/2.c
2021-11-05 00:59:48 +08:00

19 lines
211 B
C

#include<stdio.h>
int main()
{
int n,a,max=0,min=2147483647;
scanf("%d\n",&n);
for(int i=1;i<=n;i++){
scanf("%d",&a);
if(a>max)max=a;
if(a<min)min=a;
}
printf("%d %d",max,min);
return 0;
}