Pregunta de entrevista de Alphachain Capital

Asked to solve a logic problem