Find the sum of all positive integers less than 1000 ending in 3 or 4 or 6 or 9.
We will tackle the general case first. What is the sum of all positive integers less than 1000 ending in a digit n?
The numbers must be of the form 10m+n where 0≤m≤99.Therefore, the answer will be 99∑m=0(10m+n)=100n+49500.
Hence, the answer to your original question will be 4(49500)+100(3+4+6+9)=200200.