You are viewing a single comment's thread. Return to all comments →
N,M = map(int,input().split()) candies = 0 for _ in range(M): start, end, candies_per = map(int,input().split()) candies += (end-start+1)*candies_per print(candies//N)
Filling Jars
You are viewing a single comment's thread. Return to all comments →