Tibra interview question

3 coding questions with some maths