Draft version

The algorithm should be correct, only if the user has enough running
time.
Just calculating the result for D=46 costs more than 10 minutes.
So, the algorithm needs to be optimized, or to be re-designed.