Smallest Common Multiple - help, I'm stuck!

If your code produces correct answer for every test on your environment, but fails on here or fails for a large input, then it is a common problem and you can move on if you wish to.

You can read about the similar discussion from this post and on. It won’t give you the exact reason, but you will know this is a common problem for challenges of this type.