scores. To keep overly harsh and overly generous judges from swaying the result, the lowest 5% and the highest 5% of scores are discarded (the number of judges is always a multiple of 20, so that is a whole number of scores on each side).
Return the mean of the remaining scores, rounded to 5 decimal places.scores=[0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 100] → 7.0
There are 20 scores, so one is dropped from each end: 0 and 100. Eighteen 7s remain, and their mean is 7.
scores=[5, 3, 9, 1, 4, 8, 2, 6, 7, 10, 5, 3, 9, 1, 4, 8, 2, 6, 7, 10] → 5.5
One 1 and one 10 are dropped. The other 18 scores add up to 99, so the mean is 5.5.
scores=[4, 0, 9, 2, 2, 8, 5, 1, 7, 3, 6, 6, 0, 9, 4, 5, 3, 8, 1, 7, 2, 4, 6, 8, 10, 3, 5, 7, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] → 4.97222
len(scores) is a multiple of 20scores=[0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 100]
7.0
Run checks the first 3 tests in your browser. Submit checks all 22 tests on the server, hidden ones included.