Fading Coder

One Final Commit for the Last Sprint

Constructing an n for Linear Congruence gcd(an+b, c)=1

A solution exists for the equation (\gcd(an+b, c) = 1) if and only if (\gcd(a, b, c) = 1). If (\gcd(a, b, c) > 1), the problem has no solution and (-1) is output. Given the condition (\gcd(a, b, c) = 1), we can construct a valid (n). Let (x = \gcd(b, c)). If (x = 1), then (n = 0) satisfies (\gcd(...