CodePudding user response:
def gcd_lcm (a, b) :
T=a * b
If a & lt; B:
A, b=b, a
While b!=0:
A, b=b, a % b
Return a, t//a
Using Euclidean algorithm.
CodePudding user response:
CodePudding user response:
def gcd_lcm (a, b) :
T=a * b
If a & lt; B:
A, b=b, a
While b!=0:
A, b=b, a % b
Return a, t//a
CodePudding user response: