Python Elegant & Short | 1-Line
Complexity\n- Time complexity: O(n)\n- Space complexity: O(1)\n\n# Code\n\nfrom math import ceil\n\nclass Solution:\n    def minElements(self, nums: List[int], 
# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(1)$$\n\n# Code\n```\nfrom math import ceil\n\nclass Solution:\n    def minElements(self, nums: List[int], limit: int, goal: int) -> int:\n        return ceil(abs(sum(nums) - goal) / limit)\n\n```
['Python3']