Source: https://maths.dis.ac-guyane.fr/IMG/pdf/chasse_au_tresor.pdf