Problem H: 最大值和最小值
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:11
Solved:10
Description
找出n个数中的最大值和最小值
Input
第1行:输入一个整数n(n的取值范围是1~1000)
第2行~第n+1行:输入n个整数(数的取值范围是-2147483648~2147483647)
第2行~第n+1行:输入n个整数(数的取值范围是-2147483648~2147483647)
Output
输出一行两个数,第一个是最大值,第二个是最小值
Sample Input Copy
5
2 3 100 -10 4
Sample Output Copy
100 -10