Domanda di colloquio di Art of Problem Solving

One puzzle solving question and another JavaScript based question