본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 33753번 주차 요금 정산하기

by 현장 2025. 4. 4.

-Code

from math import ceil

a, b, c = map(int, input().split())
t = int(input())
res = a if t > 0 else 0
t = max(0, t - 30)
res += ceil(t / b) * c

print(res)