1296: 求n个数的最大值和最小值

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:4

Description

任意输入n个整数,把它们的最大值,最小值求出来.

Input

输入只有一行,包括一个整数n(1<=n<=20),后面跟着n个数.

Output

输出只有一行,包括2个整数。

Sample Input Copy

5 1 99 3 6 0

Sample Output Copy

99 0

Source/Category