Given $N$, $a$, $b$ and condition that all are positive integers, how to find whether any positive integer $x$ exists such that $b|(N-ax)$.
And if any such $x$ exists how to calculate minimum value of $x$?
This looks elementary but somehow I am stuck.