Viridien interview question

Questions about maths and logic