화성수학
https://www.acmicpc.net/problem/5355
import sys
num = int(input())
for i in range(num):
arr = list(map(str, input().split()))
rst = 0
for i in range(len(arr)):
if i==0 : rst=float(arr[i])
else :
if arr[i] == "@" : rst= rst*3
elif arr[i] == "%" : rst = rst+5
elif arr[i] == "#" : rst = rst-7
print("%0.2f" % rst)
'PROGRAMMING CODE > PYTHON' 카테고리의 다른 글
[BAEKJOON] No.10817 Python (0) | 2023.02.07 |
---|---|
[BAEKJOON] No. 2935 Python (0) | 2023.02.07 |
[BAEKJOON] No.2914 Python (0) | 2023.02.06 |
[BAEKJOON] No.10699 Python (0) | 2023.01.27 |
[BAEKJOON] No.2163 Python (0) | 2023.01.27 |