Pregunta de entrevista de Amazon

basic puzzle, about testing cycle