I have this code that seems to be working for number 6-8 digits, in a normal time period. When I enter bigger values the amount get ridiculously bug. It takes more than 4 hours to complete. Here is my code.I have this code that seems to be working for n