쏘ing
[Python] 백준 17219 비밀번호 찾기 본문
https://www.acmicpc.net/problem/17219
풀이
import sys
# N : 저장된 사이트 수, M : 찾고 싶은 사이트 수
N, M = map(int, sys.stdin.readline().rstrip().split())
# 딕셔너리
site = {}
for _ in range (N):
a, b = sys.stdin.readline().rstrip().split()
site[a] = b
for _ in range (M):
print(site[sys.stdin.readline().rstrip()])
'알고리즘 > CLASS 3' 카테고리의 다른 글
[Python] 백준 11279 최대 힙 (0) | 2022.02.21 |
---|---|
[Python] 백준 1764 듣보잡 (0) | 2022.02.21 |
[Python] 백준 1620 나는야 포켓몬 마스터 이다솜 (0) | 2022.02.21 |
[Python] 백준 1676 팩토리얼 0의 개수 (0) | 2022.02.21 |
[Python] 백준 9375 패션왕 신해빈 (0) | 2022.02.21 |
Comments