공부/문제풀기

프로젝트 오일러 문제 1

아야카 2018. 11. 4. 18:57
728x90

Multiples of 3 and 5

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.

below 1000이므로 1000 미만까지의 수에서 3 or 5의 배수인 수의 합을 구하는 문제



728x90