Pergunta de entrevista da empresa Jane Street

I recommend searching on math stack exchange.