Pregunta de entrevista de Curiosity Gym

Write code to solve a puzzle.