Getting one wrong answer

i cannot understand what is wrong with my code .it is showing one answer wrong.

hey Anish, when you are calling the function from main(), you have done a% c. The same thing you have to do for everytime when you call the function recursively.
As number can be negative also, you will should make it positive by (y+c)%c
here are the changes that I have made in your code

Thanks.But there were no negative no.s in the question.I found my problem.All I had to do was use long long in place of int.The changes you made had “long y”,which is why it passed all the test cases and mine did not.