#t42. 求极差
求极差
Range of Numbers
Problem Description
Given and integers , compute the range of these integers. The range means the difference between the maximum and the minimum of a set of numbers.
Input Format
The first line contains a positive integer , the number of integers.
The second line contains integers , separated by spaces.
Output Format
Output one integer: the range of these integers.
Sample Input
6
4 1 5 1 4 1
Sample Output
4
Sample Explanation
The input integers are . The maximum is and the minimum is , so the range is .
Constraints
, .