Divisibility Problem
EasyRating 800CodeforcesMath & Implementation
Approach hintTry it first, then revealHide
The remainder a % b tells how far a is past the previous multiple of b, and the moves must reach the next multiple. Handle separately the case where a is already divisible.