Pregunta de entrevista de Art of Problem Solving

One puzzle solving question and another JavaScript based question