How to approach this question ? The contest is over but I want to know the ways by which we can solve it.