lcm math python library code example
Example: lcm math python library
from math import gcd
def lcm(a,b):
return a*b/(gcd(a,b))
print(lcm(12,70))
//output: 420
from math import gcd
def lcm(a,b):
return a*b/(gcd(a,b))
print(lcm(12,70))
//output: 420