$$111x \equiv 112 \bmod 113$$
I've tried all the theorems. The only thing I found is that there is only one solution. Other than trying all 1-113 possible values that x takes, is there any efficient way to do it?
$$111x \equiv 112 \bmod 113$$
I've tried all the theorems. The only thing I found is that there is only one solution. Other than trying all 1-113 possible values that x takes, is there any efficient way to do it?
Use negative numbers. We have $111\equiv -2\pmod{113}$ and $112\equiv -1\pmod{113}$.
Thus we want $-2x\equiv -1\pmod{113}$, that is, $2x\equiv 1\equiv 114\pmod{113}$. That gives $x\equiv 57\pmod{113}$.