Source: https://pcohenbastie.tech/six/informatique/exercicebaremeetcorrection.pdf