• + 0 comments
    python3
    
    def solve(n, operations):
        # Write your code here
        total = 0
        for i in operations:
            indices = i[1]-i[0]+1
            total += i[2]*indices
            
        return math.floor(total/n)