UBS interview question

Some very hard maths questions