I found the numbers it wasn't working with and printed the output. As n got closer to the max value of int it would flip to a random minus number and then flip between -1 and -2 for ever more....
Type: Posts; User: samfin
I found the numbers it wasn't working with and printed the output. As n got closer to the max value of int it would flip to a random minus number and then flip between -1 and -2 for ever more....
Hi,
This is my first post here so hi all and bear with me.
I am trying to solve problem 14 on Project Euler to find the longest Collatz sequence under 1000000. I have come up with the following...