Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 더현대서울 맛집
- 코로나19
- leetcode
- 캐치카페
- gs25
- programmers
- ubuntu
- Kaggle
- AI 경진대회
- hackerrank
- SW Expert Academy
- PYTHON
- 편스토랑
- 데이콘
- 맥북
- Docker
- 자연어처리
- 프로그래머스 파이썬
- 파이썬
- Real or Not? NLP with Disaster Tweets
- github
- dacon
- Git
- 우분투
- 백준
- 금융문자분석경진대회
- 프로그래머스
- 편스토랑 우승상품
- ChatGPT
- Baekjoon
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 3047번 : ABC (Python) 본문
728x90
반응형
코딩 1일 1문제! 오늘의 문제는 백준의 ABC 입니다.
👨🏻💻 코드 ( Solution )
def ABC(number_list, alphabet_list):
sorted_list = sorted(number_list)
key_list = ["A", "B", "C"]
alpha_dict = {}
for alpha, num in zip(key_list, sorted_list):
alpha_dict[alpha] = num
answer_list = [str(alpha_dict[alpha]) for alpha in alphabet_list]
return " ".join(answer_list)
if __name__ == "__main__":
number_list = map(int, input().split())
alphabet_list = list(input())
print(ABC(number_list=number_list, alphabet_list=alphabet_list))
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[BaekJoon] 3486번 : Adding Reversed Number (Python) (0) | 2022.09.11 |
---|---|
[BaekJoon] 8611번 : 팰린드롬 숫자 (Python) (0) | 2022.09.09 |
[BaekJoon] 4740번 : 거울, 오! 거울 (Python) (0) | 2022.09.07 |
[BaekJoon] 6764번 : Sounds fishy! (Python) (1) | 2022.09.06 |
[BaekJoon] 2547번 : 사탕 선생 고창영 (Python) (2) | 2022.09.05 |
Comments