Editorial for DMOPC '15 Contest 4 P5 - Scribe


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

An easy approach is to count the occurrences of each digit for x-1 and y separately, then subtract to get the answer.

Time Complexity: \mathcal{O}(T)


Comments


  • 2
    fifiman  commented on Jan. 13, 2016, 9:47 a.m. edited

    Can I get a better explanation for finding the number of digits x from 1 to y?