Pergunta de entrevista da empresa Jane Street

Two math questions testing logic/probability