first commit

from old repository to a new repository
This commit is contained in:
Gyubin Han
2024-04-30 16:59:10 +09:00
commit 2600340c03
93 changed files with 1610 additions and 0 deletions

15
boj/1620.py Normal file
View File

@@ -0,0 +1,15 @@
import sys
n,m=map(int,sys.stdin.readline().rstrip().split())
dic1=dict()
dic2=dict()
for i in range(1,n+1):
dic1[i]=sys.stdin.readline().rstrip()
dic2[dic1[i]]=i
for _ in range(m):
s=sys.stdin.readline().rstrip()
try:
print(dic1.get(int(s)))
except:
print(dic2.get(s))