Beats 100%||O(1) TC and SC
Intuition\n If sum of the nums is already equal to goal,no need to add anything so return 0\nElse if sum is less than goal we need to add some elements,the sum 
# Intuition\n<!-- If sum of the nums is already equal to goal,no need to add anything so return 0\nElse if sum is less than goal we need to add some elements,the sum of the elements to be added will be the difference between the goal and the sum of all elements in the current list. If this sum is less than the limit just return 1 as the difference can be added as one element -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- O(1) -->\n\n- Space complexity:\n<!-- O(1) -->\n\n# Code\n```\nclass Solution:\n    def minElements(self, nums: List[int], limit: int, goal: int) -> int:\n        if sum(nums)==goal:\n            return 0\n        x=goal-sum(nums)\n        if abs(x)<limit:\n            return 1\n        count=0\n        count+=math.ceil(abs(x)/limit)\n        return count\n```
['Python3']