-Code
prices = [int(input()) for _ in range(4)]
my_cost = prices[0]
if my_cost >= prices[1]:
print("Watermelon")
elif my_cost >= prices[2]:
print("Pomegranates")
elif my_cost >= prices[3]:
print("Nuts")
else:
print("Nothing")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 1213번 팰린드롬 만들기 (0) | 2025.02.03 |
---|---|
[백준/파이썬] 6162번 Superlatives (0) | 2025.02.02 |
[백준/파이썬] 33179번 Hezardastan’s Annual Report (0) | 2025.01.31 |
[백준/파이썬] 33166번 鉄道旅行 3 (Railway Trip 3) (0) | 2025.01.30 |
[백준/파이썬] 33163번 OIJ (OIJ) (0) | 2025.01.29 |