You are viewing a single comment's thread. Return to all comments →
C++ solution :
long long solve(int n, vector<vector<long>> operations) { long long sum=0; for (int i=0;i<operations.size();i++) sum+=operations[i][2]*(operations[i][1]-operations[i][0]+1); sum/=n; return sum; }
Seems like cookies are disabled on this browser, please enable them to open this website
Filling Jars
You are viewing a single comment's thread. Return to all comments →
C++ solution :