the solution of the ChocolatesByNumbers