[백준]B3-1864

py_code·2021년 1월 8일
0

백준-브론즈3

목록 보기
29/38

dic = {'-': 0, '\\': 1, '(': 2, '@': 3, '?': 4, '>': 5, '&': 6, '%': 7, '/': -1}
while True:
    l = input().rstrip()
    if l=='#':break
    t = 0
    for i in range(len(l)):
        t += dic.get(l[i])*(8**(len(l)-i-1))
    print(t)
profile
개발자를 꿈꿉니다.

0개의 댓글