IntermediateSorting2000 ms256 MB
Mentor Pairing
Given skill scores for students, sort them and print the difference between the highest and lowest score.
Statement
Given skill scores for students, sort them and print the difference between the highest and lowest score.
Input
The first line contains `n`. The second line contains `n` integers.
Output
Print max score minus min score.
Constraints
- `1 <= n <= 100000`
Examples
Example 1
Input
5
12 8 19 15 10Output
11The highest score is 19 and the lowest is 8.
Sample runs use visible examples. Full submissions are checked securely on the server, and private test cases are not shown in the browser.