← Back to List

26933번: Receptet ↗

Solutions

Python 3
116 B | 116 chars
ans = 0
for i in range(int(input())):
    a, b, c = map(int,input().split())
    ans += max(b - a, 0) * c
print(ans)