Given $x,y,z$ and knowing that all variables are integers, how could one uniquely solve:
$$xa-yb = z$$ ($\text{mod}\; xy$, of course).
I came across this when trying to solve a modulo question on a competition and I realized I always just guessed when I had the answer down to that form and it worked.