제출 #161449

#제출 시각아이디문제언어결과실행 시간메모리
161449boolodifjenulaElder (COCI19_elder)Cpython 3
26 / 50
27 ms3428 KiB
ima=input() N=int(input()) k=1 L=[ima] for i in range (N): Z1,Z2=map(str,input().split()) if Z2==ima: ima=Z1 if bool(Z1 in L)==0: k+=1 L+=[Z1] print(ima) print(k)
#Verdict Execution timeMemoryGrader output
Fetching results...