Pergunta de entrevista da empresa MinuteKEY

Logic problem involving brownies