一个普通程序员.
© 2022. All rights reserved.
Easy
签到题,直接根据题目意思,先给整个组数求和后去除最大值和最小值,再除以n-2
n-2
AC!
python3
class Solution: def average(self, salary: List[int]) -> float: return (sum(salary) - min(salary) - max(salary)) / (len(salary) - 2)