gettting wrong answer

http://www.codechef.com/viewsolution/4553292