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

[백준/파이썬] 25704번 출석 이벤트

by 현장 2022. 10. 24.

-Code

n = int(input())
p = int(input())
sale = [0]
if n >= 20:
    sale.append(p * 0.25)
if n >= 15:
    sale.append(2000)
if n >= 10:
    sale.append(p * 0.1)
if n >= 5:
    sale.append(500)

print(int(max(0, p - max(sale))))