re: Project Euler #5 - Finding the Smallest Multiple VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Here's mine! def greatest_common_denominator(a, b): while b: a, b = b, a % b return a def least_common_multiple(a, b): ...
 

The most significant part here is that you can compute the least common multiple by computing the greatest common denominator and using it to divide the product of the two numbers.

I was about to propose a similar solution (in JavaScript) but yours is sufficient 👍
(Yes, the language itself isn't important for me. Just the mathematical challenge.)

code of conduct - report abuse