Skip to main content

One post tagged with "javascript"

View All Tags

Project Euler 001 The Hard Way

· 8 min read
Brian Graham
Consultant
Historical Context

This is a rewrite of an article I wrote in January 2012 where I discover the hidden complexity of a simple programming problem.

Problem 001​

On the popular programming challenge website Project Euler, the first problem seems quite trivial. However, with deeper examination we can discover layers of complexity as we try to generalize the problem.

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.