Type: RemoteJudge 1000ms 128MiB

【例41.3】 最小数和最大数

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.

说明

输入 nn 个数,找到其中最小的数和最大的数。

输入格式

第一行一个整数 nn (1n1001≤n≤100),表示数据的个数。
第二行 nn 个整数 aia_i(1ai100001≤a_i≤10000)。

输出格式

两个整数,分别表示最小的数和最大的数。

样例

4
3 9 8 1
1 9

AShui0709堂训

Not Claimed
Status
Done
Problem
17
Open Since
2025-7-9 0:00
Deadline
2025-7-17 23:59
Extension
24 hour(s)