Pergunta de entrevista da empresa Fluential

Coding questions, you can solve it by python and C++. I did not get the code problem.