2335. Minimum Amount of Time to Fill Cups

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2335

class Solution:
    def fillCups(self, amount: List[int]) -> int:
        amount.sort()
        if amount[0] + amount[1] <= amount[2]:
            return amount[2]
        return (sum(amount) + 1) // 2