https://www.codechef.com/viewsolution/35762178 can anyone explain why this is giving WA. It is passing sample test cases.