Bending Spoons interview question

Questions about maths and logic