Smallest Common Multiple - solution

Hi, I just did the challenge pointed in the title. I managed to solved it but I feel that I complicated the solution.
Here is my solution:
https://pastebin.com/pvPwP35r

I will appreciate - if someone can give me a feedback on the code I wrote and help me understand how I can make it better.

Thanks!