-Code
for _ in range(int(input())):
g, c, e = map(int, input().split())
total_need = e - c
if total_need <= 0:
print(0)
elif g == 1:
print(total_need)
elif g == 2:
print(total_need * 3)
else:
print(total_need * 5)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 26583번 Scale (0) | 2023.04.10 |
---|---|
[백준/파이썬] 6974번 Long Division (0) | 2023.04.09 |
[백준/파이썬] 27272번 Пары (0) | 2023.04.07 |
[백준/파이썬] 8661번 Stopki (0) | 2023.04.06 |
[백준/파이썬] 5013번 Death Knight Hero (0) | 2023.04.05 |