why am I getting a wrong answer

https://www.codechef.com/viewsolution/20928366

//