Pergunta de entrevista da empresa Citadel Securities

Solve programming problem in one line