You are viewing a single comment's thread. Return to all comments →
Can someone please tell me why my test cases 4,5&6 are failing, I even changed the return type of the function to long long. Here is my code ->
long long solve(int n, vector<vector<int>> operations) { long long avg=0; for(int i=0; i<operations.size(); i++) { long long a,b,c; a = operations[i][0]; b = operations[i][1]; c = operations[i][2]; avg += (b-a+1)*c; } avg = avg/n; return avg; }
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 →
Can someone please tell me why my test cases 4,5&6 are failing, I even changed the return type of the function to long long. Here is my code ->