1785. Minimum Elements to Add to Form a Given Sum Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1785class Solution: def minElements(self, nums: List[int], limit: int, goal: int) -> int: d = abs(sum(nums) - goal) return (d + limit - 1) // limit