#B4151. Student Score Range
Student Score Range
Student Score Range
After the midterm exam, Teacher Gao wants to know the polarization of student scores in the class in order to take effective measures. There are \(n\) students in the class, and each student's score is an integer from 0 to 100. Your task is to compute the difference between the highest and lowest score, i.e., \(\max\{score\} - \min\{score\}\).
inputFormat
The first line contains an integer \(n\) (\(1 \leq n \leq 10^5\)), representing the number of students. The second line contains \(n\) space-separated integers, each in the range of 0 to 100, representing the student scores.
outputFormat
Output a single integer which is the difference between the highest and lowest scores in the class.
sample
5
50 80 70 90 30
60