Https://www.codechef.com/viewsolution/26167914

https://www.codechef.com/viewsolution/26167914 please check this code and tell me where i am wrong . Please help me with this code.

I just edited in your code you have to just put the equal sign in condition itself.
https://www.codechef.com/viewsolution/26193642

ohh thanks man. I was just stupid and could not solve it during lunch time.