-Code
n = int(input())
res = 0
for i in range(n):
h, b, k = map(int, input().split())
buy = b - h
if buy > 0:
res += buy * k
print(res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 26026번 Coffee Cup Combo (0) | 2023.02.27 |
---|---|
[백준/파이썬] 9772번 Quadrants (0) | 2023.02.26 |
[백준/파이썬] 26645번 성장의 비약 선택권 (0) | 2023.02.24 |
[백준/파이썬] 27541번 末尾の文字 (Last Letter) (0) | 2023.02.23 |
[백준/파이썬] 23080번스키테일 암호 (0) | 2023.02.21 |