pay, all different. So that a single director and a single intern do not skew the picture, an analyst computes the average salary leaving out the highest and the lowest one.
Return that average. An answer is accepted if it is within 10⁻⁵ of the exact value.pay=[3200, 1500, 8000, 2500] → 2850.0
Drop the lowest pay 1500 and the highest 8000; 3200 and 2500 remain: (3200 + 2500) / 2 = 2850.
pay=[1000, 5000, 1200] → 1200.0
After dropping the extremes, only 1200 is left, so that is the average.
pay ≤ 100pay[i] ≤ 10⁶pay are distinctpay=[3200, 1500, 8000, 2500]
2850.0
Run checks the first 3 tests in your browser. Submit checks all 81 tests on the server, hidden ones included.