Valeo Interview Question

Solve a problem using C++ via online compiler.