Linear Diophantine equation solvability criterion (source code)

= Linear Diophantine equation solvability criterion

The equation $ax+by=c$ has an integer solution exactly when $\gcd(a,b)$ divides $c$. Bézout's identity proves sufficiency, while every integer linear combination of $a,b$ is divisible by their greatest common divisor.