Easy to understand
Code\n\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n        \n        long sum=0;\n        for(int i=0; i<nums.siz
# Code\n```\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n        \n        long sum=0;\n        for(int i=0; i<nums.size(); i++) {\n            sum += nums[i];\n        }\n\n        long req = abs(goal - sum);\n        int ans = req / limit;\n        if(req % limit != 0) ans++;\n        return ans;\n    }\n};\n```
['C++']