Counting and counting...

How many integers from 1 1 to 1 0 6 10^{6} inclusive have their sum of digits (in base 10) divisible by 5?


The answer is 199999.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

It is easy to observe that for every 10 number, there exists an integer of which sum equals 5 n 5n . Adding a 5 to it produces a number whose sum equals 5 n + 5 5n+5 whichnis also included in the same set of number. Therefore, answer is 1000000 / 10 2 1 1000000/10 *2 -1 , the one is being deducted, just because there don't exist two such number in the first ten integer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...