Amazon interview question

Basic Math question and knotweed questions.