[백준]B3-1547

py_code·2020년 12월 3일
0

백준-브론즈3

목록 보기
13/38

a = [0,1,2,3] # 인덱스활용을 쉽게 하기 위해 1번 컵의 인덱스를 1로 조정
n = int(input())
for _ in range(n):
  i,j = map(int, input().split())
  a[i],a[j] = a[j],a[i]
print(a.index(1)) # 1번 컵의 위치를 뽑기
profile
개발자를 꿈꿉니다.

0개의 댓글