Pregunta de entrevista de Citadel Securities

Solve programming problem in one line