Home > other >  Python code on LCD and LCM
Python code on LCD and LCM

Time:12-29

Really thank you very much if you can answer,

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:

reference 1st floor cclxpp123 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.

Classmate, can say the detailed point? I Python is not very good, I am a beginner, why, this type of code is not the result??
  • Related