What is the sum of all numbers from 1 to 100 that cannot be divisible by 5 or 9?

What is the sum of all numbers from 1 to 100 that cannot be divisible by 5 or 9?


Positive infinity, you forget to say integer
- -
(1 + 2 + 3 +... + 100) - (5 + 10 + 15 +... + 100) - (9 + 18 + 27 +... + 99) + 45 + 90



Among the 100 numbers from 1 to 100, there are numbers that can not be divided by 5 or 9, and their sum is ()


There are 20 numbers divisible by 5 and the sum is 1050
There are 11 numbers divisible by 9 and the sum is 594
There are two numbers divisible by 5 and 9, 45 and 90, and 135
1+2+...+100=5050
5050-1050-594+135=3541



What is the sum of all the numbers from 1 to 100 that cannot be divisible by 5 or 9?


The sum is: 1 + 2 + +100 = 5050, the sum of the numbers divided by 5 is 5 × (1 + 2 +...) +20) The sum of the numbers divided by 9 is: 9 × (1 + 2 +...) 11) The sum of the numbers divisible by 45 is: 45 + 90 = 135, so all the numbers from 1 to 100 cannot be divisible by 5 and 9