2144. Minimum Cost of Buying Candies With Discount

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

Содержание

LeetCode problem 2144

class Solution:
    def minimumCost(self, cost: List[int]) -> int:
        cost.sort(reverse=True)
        return sum(cost) - sum(cost[2::3])