본문 바로가기
python-algorithm

백준 3047 ABC

by 무적김두칠 2021. 11. 30.

1
2
3
4
5
6
7
8
9
tmp=list(map(int,input().split()))
tmp=sorted(tmp)
ans=[]
s=input()
for i in s:
    if i=='A': ans.append(tmp[0])
    if i == 'B': ans.append(tmp[1])
    if i == 'C': ans.append(tmp[2])
print(*ans)
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 10173 니모를 찾아서  (0) 2021.12.02
백준 3049 다각형의 대각선  (0) 2021.11.30
백준 2998 8진수  (0) 2021.11.30
백준 2592 대표값  (0) 2021.11.30
백준 20953 고고학자 예린  (0) 2021.11.30

댓글