Project Euler - Problem 1.

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.



- 10보다 작은 자연수 중 3과 5의 배수로는 3, 5, 6, 9가 있다. 이를 모두 합하면 23이다. 1000보다 작은 3과 5의 배수의 합은?




등차수열을 이용해서 풀면 속도도 빠르고 효율도 좋지만 생각나는대로 풀어봤습니다...

Posted by 긍정왕오킹