diff --git a/code_study/Baekjoon/python/1547.py b/code_study/Baekjoon/python/1547.py new file mode 100644 index 0000000..fa41b9b --- /dev/null +++ b/code_study/Baekjoon/python/1547.py @@ -0,0 +1,5 @@ +ans = 1 +for _ in range(int(input())) : + a, b = map(int, input().split()) + ans = a if b == ans else b if a == ans else ans +print(ans) \ No newline at end of file