Source: https://ressources.unisciel.fr/algoprog/s13ssprg/emodules/ss04mexerc1/res/ss04exerc1-enonce-alg-xxx.pdf