ROSECODE 266
Counting the zeros
Consider the integers in range [111 .. 122] in binary form:
There are 28 zeros.
How many times does the digit 0 appear in the range [12,345,678,910,111,213 .. 31,211,101,987,654,321]?
[My timing: < 100 ms]
1 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0and count how many times the digit 0 appears.
There are 28 zeros.
How many times does the digit 0 appear in the range [12,345,678,910,111,213 .. 31,211,101,987,654,321]?
[My timing: < 100 ms]