Your code does not duplicate johngg's code.
Give a man a fish: <%-{-{-{-<
In reply to Re^3: finding the correct integer by AnomalousMonk in thread finding the correct integer by YarNik