1701. Average Waiting Time

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

Содержание

LeetCode problem 1701

class Solution:
    def averageWaitingTime(self, customers: List[List[int]]) -> float:
        tot = t = 0
        for a, b in customers:
            t = max(t, a) + b
            tot += t - a
        return tot / len(customers)