Pergunta de entrevista da empresa Epic

Question on arrays, math puzzles, basic coding