Amazon Interview Question

Basic Math question and knotweed questions.