explain please why wrong

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