FLOW016- Input and output are same

What is wrong in my code as it prints input as output.

# cook your dish here
for i in range(int(input())):
    a,b=map(int,input().split())
    def compute_gcd(a,b):
        while(b):
            a,b=a,a%b
        return a
    def compute_lcm(a,b):
        return int((a*b)//compute_gcd(a,b))
    x,y=compute_gcd(a,b),compute_lcm(a,b)
    print(f"{x} {y}")

you have an error in your compute_gcd function.
Fixed version:

def compute_gcd(a,b):
    while(b):
        a,b=b,a%b
    return a
1 Like