Amazon interview question

The math questions