Malte Krupa

Project Euler 1 - 2023-09-22

The first problem is a rather easy one.

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

My solution:

I choose to solve this with some recursion which is making use of tail-call optimization.

My biggest “issue” was to remember the Enum.to_list/1 function because my text editor was only showing part of the Enum functions in the code completion. :)

Privacy Policy | Imprint