Pergunta de entrevista da empresa Amazon

Basic Math question and knotweed questions.