You are viewing a single comment's thread. Return to all comments →
My python solution
def solve(n, operations): return int(sum(list(map(lambda x:(x[1]-x[0]+1)*x[2],operations))) / n)
Another Python Solution
def solve(n, operations): sum=0; for e in operations: l=list(e) sum+=(l[1]-l[0]+1) * l[2] return int(sum/n)
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 →
My python solution
Another Python Solution