找最小值
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≤100) 和 n 个整数 ai (0≤ai≤1000) ,求这 n 个整数中最小值是什么。 提示:我们可以使用 min() 函数来获得两个数字中的最小值 。需要使用 algorithm 头文件。
minnum = min(minnum, tmp);
maxnum = max(maxnum, tmp);
前者 minnum 取 minnum 和 tmp 中 较小 的那个 后者 maxnum 取 maxnum 和 tmp 中 较大 的那个
样例输入
3
1 2 5
样例输出
1
龙凤苑B班5.16
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2024-5-16 16:00
- End at
- 2024-5-20 16:00
- Duration
- 96 hour(s)
- Host
- Partic.
- 12