Problem #266

Counting the zeros
Public 09/11/15 9xp Programming 58.3%

Consider the integers in range [111 .. 122] in binary form:
 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 0
and 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]



You need to be a member to keep track of your progress.
Register


Time may end, but hope will last forever.

Other Challenge Sites

Contact

elasolova
[64][103][109][97][105][108][46][99][111][109]