1491. Average Salary Excluding the Minimum and Maximum Salary

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1491

class Solution:
    def average(self, salary: List[int]) -> float:
        s = sum(salary) - min(salary) - max(salary)
        return s / (len(salary) - 2)