How many zeroes(Uva)?

Hi, i trying to solve this https://uva.onlinejudge.org/external/110/11038.html
The problem is about couting the no of occurences of zeroes in an interval.
Event though i read a tutorial http://www.algorithmist.com/index.php/UVa_11038 a was not able to come up with solution any one please help … thank u

Read the updated answer from this link. Its really good, easy to understand and sufficient for this problem.

//