Project Euler #137: Fibonacci golden nuggets

  • + 1 comment

    My algorithm is O(log N). And actually it goes into memory error before timeout because I precompute some Fibonacci numbers. It happens after N = 2^(2^20), so after 10^315652.

    But you have to do it up to 10^5 times, thats why I precompute some Fibonacci numbers.

    It takes 4s in python on the last test, so 10^5 Ns with each N up to 10^18.