Not working nrez error

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