Done

One should keep in mind is the default round in Java remove every thing
after "."; other wise infinite loop may occur.
Another is the every number distinct assumption, if so, magic will
appear left or right.