Smallest Common Multiple - Inconsistent results

Hi,

I think your code works but it might be timing out. If your code runs long FCC just assumes you have an endless loop and halts execution. I ran your code in developer console and it ran to completion with correct answers.

You can bypass that endless loop protection in FCC if you are confident in the code. (There is also solution at link showing what to do if you have an endless loop that prevents you from returning to the problem page.)

That said, if your code is running that long it may need some tweaking.

Good luck. That’s a hard one.

1 Like