1
2
3
4
5
6
7
8
9
|
import sys
for _ in range(int(sys.stdin.readline())):
tmp=list(sys.stdin.readline().split())
ans=float(tmp[0])
for i in range(1,len(tmp)):
if tmp[i]=='@': ans*=3
elif tmp[i] == '%': ans += 5
elif tmp[i] == '#': ans -= 7
print("%.2f"%ans)
|
cs |
반응형
댓글