找最值
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.
题目描述
给出 和 个整数 ,求这 个整数中最小值和最大值。
输入格式
第一行输入一个正整数 ,表示数字个数。
第二行输入 个非负整数,表示 ,以空格隔开。
输出格式
输出两个非负整数,中间以一个空格隔开,分别表示这 个非负整数中的最小值和最大值。
样例 #1
样例输入 #1
8
1 9 2 6 0 8 1 7
样例输出 #1
0 9
提示
数据保证, 且 。
循环结构小测(一)
- Status
- Done
- Rule
- IOI
- Problem
- 5
- Start at
- 2025-11-2 9:00
- End at
- 2025-12-2 9:00
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 19