본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]6060번 Wheel Rotation

by 현장 2021. 4. 16.

-코드

t = int(input())
r = 0
a = []
b = []

for i in range(t - 1):
    s, d, c = list(map(int, input().split()))
    a.append(d)
    b.append(c)

for i in range(t - 1):
    r ^= b[i]
print(r)