Pergunta de entrevista da empresa Dynetics

Some coding problem (sorry I forgot this one)