Linear congruence

2 test cases are not running


is my code link.

@Adarshrajpandey your cx and cy variables in the gcd function need to be long long . Please make the required change.
ll cx, cy;
cx = y;
cy = (x - ((a / b) * y));
x = cx;
y = cy;

@Adarshrajpandey If you don’t have any further queries please mark the doubt as resolved.