Codechef problem solved by me.