https://www.acmicpc.net/problem/2754
import sys
n = input()
num = 0.0
if n[0] == 'A' :
num = 4.0
elif n[0]=='B' :
num = 3.0
elif n[0]=='C' :
num = 2.0
elif n[0]=='D':
num = 1.0
if num != 0.0 :
if n[1] == '+' :
num += 0.3
elif n[1] == '-' :
num -= 0.3
print(num)
'PROGRAMMING CODE > PYTHON' 카테고리의 다른 글
[BAEKJOON] No.9610 Python (0) | 2023.03.22 |
---|---|
[BAEKJOON] No.10988 Python (0) | 2023.03.22 |
[BAEKJOON] No.3009 Python (0) | 2023.03.21 |
[BAEKJOON] No. 4101 Python (0) | 2023.03.21 |
[BAEKJOON] No.2480 Python (0) | 2023.03.21 |