#P5726. Judge Score Averaging
Judge Score Averaging
Judge Score Averaging
There are (n) judges (with (n \le 1000)) who grade a competitor, with each score ranging from 0 to 10. To determine the competitor's final score, remove one highest score and one lowest score (if there are multiple occurrences, remove only one of each). The final score is the average of the remaining scores, computed to 2 decimal places.
inputFormat
The first line contains an integer (n), the number of judges. The second line contains (n) integers representing the scores given by the judges.
outputFormat
Output the final score of the competitor as a floating-point value rounded to 2 decimal places.
sample
5
9 1 5 7 6
6.00