[Tutor] Add all natural numbers that are multiples of 3 and 5
kent37 at tds.net
Sun Jan 4 01:57:18 CET 2009
On Sat, Jan 3, 2009 at 7:43 PM, Andre Engels <andreengels at gmail.com> wrote:
> On Sun, Jan 4, 2009 at 1:06 AM, Benjamin Serrato
> <benjamin.serrato at gmail.com> wrote:
>> I'm trying to correctly solve the first projecteuler.net problem. The
>> question is as so: Find the sum of all the multiples of 3 or 5 below 1000.
> Then the main body can be changed to:
> print (sumTotal(3) + sumTotal(5))
This will double-count numbers which are multiples of both 3 and 5
such as 15 which I don't think the problem intends.
More information about the Tutor