CSUB getting wrong answer

code works perfectly on my pc ,but gives wrong ans on codechef

One thing that I can say now is “Try some corner cases of your own”

read this - http://discuss.codechef.com/questions/855/what-kind-of-comment-should-i-post-on-the-problem-page

//