From 42a6d794e55397ac1734a1fb0de946e70ec8ae56 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Fri, 6 Feb 2026 23:26:01 +0900 Subject: [PATCH] baekjoon 20250206 --- code_study/Baekjoon/python/1547.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 code_study/Baekjoon/python/1547.py 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