Problem with the recurrence relation of a dp problem

Revision en1, by flash_7, 2015-08-04 19:45:34

Given two decimal numbers U and V if we write down all the numbers from U to V how many zeroes(0) we will write?Where U<=V<=10^9 For example if U = 100 and V = 105 then we have to write 100,101,102,103,104,105 There are total 7 zeroes therefore the result is 7. I was trying to find a pattern but i could not come up with any perfect solution :(

Tags dp, number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English flash_7 2015-08-04 19:45:34 399 Initial revision (published)