AtCoder round 164 Problem D doubt

Revision en2, by KnightKnight, 2020-04-28 13:07:53

This is the link for the question. But I will state the question here as well as this task gives us a string of digits in which we have to find number of substrings that are divisible by 2019, I have tried with the editorial but one thing seems to be ambiguous and I am not able to reason it out this line states that " 2019 is not divisible by 2 or 5, so there exists the inverse of 10 in mod2019. So 10n is a multiple of 2019 if and only if n is a multiple of 2019" What is the inverse helping us out in finding divisibility for substrings It will be a great help if some one could clear my doubts

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English KnightKnight 2020-06-29 23:24:49 120
en2 English KnightKnight 2020-04-28 13:07:53 2 Tiny change: 'es us a sting of dig' -> 'es us a string of dig'
en1 English KnightKnight 2020-04-28 12:44:15 687 Initial revision (published)