Linear congruence problem


this code is passing all the test cases if I print (ans-1) in the last line instead of writing ans. Why is it so?

@nayakashutosh99
Line 44
You’re initialising ans = 1 :laughing:
It should be 0 buddy
If your doubt is resolved please close it

ohh sorry. Got it. Thank you

1 Like