B. Make Almost Equal With Mod(Modular arithmetic)

Revision en1, by akzytr, 2024-04-13 15:45:45

I could not solve 1909B - Make Almost Equal With Mod on my own and thus looked at the tutorial, which among other things writes the following:

if a % m = k:

a % 2m is either k, or k+m

Is there any proof/concept of modular arithmetic that explains why this is so?

Tags modular arithmetic

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English akzytr 2024-04-13 15:45:45 308 Initial revision (published)