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

[백준/파이썬] 5342번 Billing

by 현장 2023. 3. 21.

-Code

cost = {"Paper": 57.99, "Printer": 120.50, "Planners": 31.25,
        "Binders": 22.50, "Calendar": 10.95, "Notebooks": 	11.20,
        "Ink": 	66.95}

res = 0

while 1:
    s = input()

    if s == "EOI":
        break

    res += cost[s]

print(f"${res}")