반응형
# @Author YoungMinKim
# baekjoon
import sys
N = int(sys.stdin.readline())
for _ in range(N):
x = list(sys.stdin.readline().split())
try:
if x[0].split('.'):
num=float(x[0])
except:
num = int(x[0])
for i in x[1:]:
if i == '@':
num*=3
elif i == '%':
num+=5
else:
num -= 7
print('%.2f'%num)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 19602 (0) | 2020.10.14 |
---|---|
baekjoon - python - 18108 (0) | 2020.10.14 |
baekjoon - python - 10845 (0) | 2020.10.10 |
baekjoon - python - 1920 (0) | 2020.10.10 |
baekjoon - python - 10815 (0) | 2020.10.10 |
댓글