Help needed in ORTHODOX distinction

Can any one tell me why my code is giving WA.
https://www.codechef.com/viewsolution/35850243