a = int(input()) for i in range(a): b = input().split() c = (a[0]) d = (a[1]) n1, n2 = c, d while c > 0: r = c%d d = c c = r gcd = d lcm = (n1*n2)//gcd print(gcd) print(lcm)
b
c = (b[0]) d = (b[1])
Quote:input should should assign in single variable like a = 12 24
b = input().split() c = (b[0]) d = (b[1])
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)