LCM Check

Description:

Write a python function to calculate the LCM of numbers Refer sample input and output for formatting specification. All float values are displayed correct to 2 decimal places. All text in bold corresponds to input and the rest corresponds to output Test Case 1 Input (stdin) 5 3 Expected Output LCM is: 15 Test Case 2 Input (stdin) 15 20 Expected Output LCM is: 60

Program :

num1 = int(input(""))

num2 = int(input(""))

numbers_min = min(num1, num2)

while(1):

    if(numbers_min % num1 == 0 and numbers_min % num2 == 0):

        print("LCM is:", numbers_min)

        break

    numbers_min += 1