Getting WA (GDOG)

https://www.codechef.com/viewsolution/33231170
my answer

Bro this is not your submission link

I have changed it.

See your for loop where you are taking mod. You should first try to debug yourself.