Simple java solution 100% beats
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n```java []\nclass Solution {\n    public int minElements(int[] nums, int limit, int goal) {\n        long sm = 0;\n        for (int num : nums) {\n            sm += num; // Summing the array elements\n        }\n\n        long req = goal - sm; // Calculate the difference between goal and sum\n        req = Math.abs(req); // Take the absolute value for required amount\n\n        int ans = (int) (req / limit); // Divide by limit to get the number of full steps\n        if (req % limit != 0) ans += 1; // If there\'s a remainder, add an extra step\n\n        return ans;\n    }\n}\n\n```
['Java']