esy c++ implementation
\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n       long long int s=0;\n        for(int i=0;i<nums.size();i++)\n 
```\nclass Solution {\npublic:\n    int minElements(vector<int>& nums, int limit, int goal) {\n       long long int s=0;\n        for(int i=0;i<nums.size();i++)\n            s+=nums[i];\n        long long int d=abs(s-goal);\n        if(d%limit==0)\n            return (int)(di/limit);\n        return (int)((di/limit)+1); \n    }\n};\n```
['C', 'C++']