728x90
반응형
단순 구현 문제이다.
limit = int(input())
speed = int(input())
d = speed - limit
if d <= 0:
print("Congratulations, you are within the speed limit!")
elif d >= 1 and d <= 20:
print("You are speeding and your fine is ${}.".format(100))
elif d >= 21 and d <= 30:
print("You are speeding and your fine is ${}.".format(270))
elif d >= 31:
print("You are speeding and your fine is ${}.".format(500))
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 6768번 Don’t pass me the ball!(python) (0) | 2021.02.05 |
---|---|
백준 알고리즘 6764번 Sounds fishy!(python) (0) | 2021.02.05 |
백준 알고리즘 5928번 Contest Timing(python) (0) | 2021.02.04 |
백준 알고리즘 5893번 17배(python) (0) | 2021.02.04 |
백준 알고리즘 5596번 시험 점수(python) (0) | 2021.02.04 |