백준 1934 파이썬 최소공배수
t = int(input()) for i in range(t): a, b = map(int, input().split()) A, B = a, b while a != 0: b = b % a a, b = b, a gcd = b lcm = A * B // b print(lcm) T = int(input()) for _ in range(T): A, B = map(int, input().split()) result = A*B while B>0: A,B = B, A%B print(result//A)
2023. 9. 4.