wrong answer help

Please help!!


What wrong with my code i got write when i checked for specified input but got wrong answer http://www.codechef.com/viewsolution/4938635