Amazon interview question

Test on mathematical reasoning