#A. [语言过关]求最大值、最小值

    Type: Default 1000ms 128MiB

[语言过关]求最大值、最小值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

给出n个整数,求出最大值和最小值

输入格式

输入共两行,第一行为一个正整数n(0<n<1000)。第二行有n个整数。

输出

输出一行两个数,第一个是最大值,第二个是最小值

样例输入

5
36 12 65 4 2

样例输出

65 2

样例

【周天10:30】课堂小测

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
3
Start at
2024-11-17 12:18
End at
2024-11-17 12:39
Duration
0.4 hour(s)
Host
Partic.
7