#P5724. 【深基4.习5】求极差 / 最大跨度值 / 最大值和最小值的差
【深基4.习5】求极差 / 最大跨度值 / 最大值和最小值的差
Problem Description
Given and integers , find the range of these integers. The range means the difference between the maximum value and the minimum value in a set of numbers.
Input Format
The first line contains a positive integer , indicating the number of integers.
The second line contains integers , separated by spaces.
Output Format
Output an integer, representing the range of these integers.
6
4 1 5 1 4 1
4
Hint
Constraints: , .
Translated by ChatGPT 5