#T734. 查找最值
查找最值
Description
Read integers from the keyboard, and from these integers, find the maximum value, the minimum value, as well as their positions.
Input Format
The first line contains an integer ();
The second line contains integers separated by spaces (each number is in the range [1, 1000]).
Output Format
The first line should display the maximum value and its position, separated by a space;
The second line should display the minimum value and its position, separated by a space;
5
5 3 6 2 4
6 3
2 4
翻译结果
CodesOnline
(注:由于"CodesOnline"是一个专有名词或品牌名称,通常保持原样不翻译。如果这是指某个特定平台或服务,且已知有官方英文名称,则应采用官方名称。此处假设"CodesOnline"即为英文原名,故直接保留。)
格式说明:
- 标题结构 "#" 保留
- 专有名词不翻译
- 无代码块故无需处理代码格式