Simple math, C++
\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n        long long sum = 0;\n        for(int u : nums)\n            s
```\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n        long long sum = 0;\n        for(int u : nums)\n            sum += u;\n\n        sum = abs(goal-sum);\n        \n        if(sum%limit == 0)\n            return sum/limit;\n        else\n            return (sum+limit)/limit;\n    }\n};\n```
[]