for x in range(int(input())):
i=list(input().split())
z=0
for y in i:
if y=='@':
z*=3
elif y=='%':
z+=5
elif y=='#':
z-=7
else:
z+=float(y)
print('%.2f'%z)
'알고리즘 > 백준' 카테고리의 다른 글
백준-5717번(상근이의 친구들)-python3 (3) | 2023.11.26 |
---|---|
백준-5622번(다이얼)-python3 (5) | 2023.11.26 |
백준-5086번(배수와 약수)-python3 (0) | 2023.11.26 |
백준-5063번(TGN)-python3 (1) | 2023.11.26 |
백준-5014번(스타트링크)-python3 (6) | 2023.11.26 |