Pregunta de entrevista de Jane Street

Two math questions testing logic/probability