pe1.py 224 B

12345678910
  1. #!usr/bin/python
  2. ### Project Euler problem 1 (estelendur)
  3. # Find the sum of all multiples of 3 or 5 under 1000
  4. sum = 0
  5. for i in range(1,1000): # assuming strictly less than 1000
  6. if (i%3==0 or i%5==0):
  7. sum += i
  8. print sum