https://1library.org/document/q295gxez-o-algoritmo-dos-doces.html