https://www.codechef.com/OCT19B/problems/MSNG

https://www.codechef.com/viewsolution/27196763
what is wrong in this code ?