Problem Description
Write a program to find the Least common divisor of the given numbers
Input 1: Positive number
Input 2: Positive number
Output:
Least common divisor
Refer sample input and output for formatting specification.CODING ARENA
a=int(input())
b=int(input())
if(a>b):
min1=a
else:
min1=b
while(1):
if(min1%a==0 and min1%b==0):
print(min1)
break
min1=min1+1
Test Case 1
Input (stdin)54 24
Expected Output216
Test Case 2
Input (stdin)25 20
Expected Output100
No comments:
Post a Comment