You are viewing a single comment's thread. Return to all comments →
I'm struggling tp solve it in Python3. My code is: http://termbin.com/9rft When I try to precompute up to 5*10^6 I get MemoryError
I tried to use lru_cache from functuls: in this case I can stay in memory, but test are timeouted at 10 seconds.
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #14: Longest Collatz sequence
You are viewing a single comment's thread. Return to all comments →
I'm struggling tp solve it in Python3. My code is: http://termbin.com/9rft When I try to precompute up to 5*10^6 I get MemoryError
I tried to use lru_cache from functuls: in this case I can stay in memory, but test are timeouted at 10 seconds.