Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=int(input())
- b=int(input())
- c=0
- if a>b:
- c=a
- else:
- c=b
- while(True):
- if c%a==0 and c%b==0:
- lcm=c
- break
- c+=1
- print("lcm",lcm)
- print("gcd",a*b/lcm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement