Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 632 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 632 Bytes

Problem 5

Problem statement

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

Comments

This seems like a job for a function that finds the least common multiple of two values and then using the .fold method on ranges.

...

And indeed it was, modulo a few quirks of rust that I'm still learning (like forgetting to specify function return values each time).

Source

Source code