Question d’entretien chez FIS

Write pseudo code to solve this problem.