Pregunta de entrevista de Amazon

Basic Math question and knotweed questions.