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

[백준/파이썬] 27880번 Gahui and Soongsil University station

by 현장 2023. 5. 22.

-Code

res = 0

while True:
    try:
        s, x = input().split()
        x = int(x)
        if s == "Es":
            res += 21 * x
        else:
            res += 17 * x

    except EOFError:
        break

print(res)