Re: [闲聊] 每日leetcode

楼主: DJYOMIYAHINA (通通打死)   2024-07-09 08:42:50
剩肥肥没钱去餐厅吃饭了
乖乖出门坐一个小时车去当帕鲁
:(
def averageWaitingTime(self, customers: List[List[int]]) -> float:
finish_t = 0
waiting_sum = 0
for c in customers:
finish_t = max(finish_t+c[1], c[0]+c[1])
waiting_sum += (finish_t-c[0])
return waiting_sum/len(customers)
作者: Sadolapapa (凛)   2024-07-09 08:48:00
别卷了
作者: rainkaras (rainkaras)   2024-07-09 08:59:00
用坐车时间刷题 大师

Links booklink

Contact Us: admin [ a t ] ucptt.com