We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Is this possible to solve without looping k-n times? I'm obviously not calculating each F(K) more than once, but mathmatically it seems that each F(K) must be calculated down to F(0). If so, the #0 testcase seems unsolvable, at least in Python.
For reference, the attempt is timing out with k-n (1 billion - 50) loops, even when the loop is empty (passing).
Is python out of the question? Am I missing some pattern that allows me to skip iterations?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Seed
You are viewing a single comment's thread. Return to all comments →
Is this possible to solve without looping k-n times? I'm obviously not calculating each F(K) more than once, but mathmatically it seems that each F(K) must be calculated down to F(0). If so, the #0 testcase seems unsolvable, at least in Python.
For reference, the attempt is timing out with k-n (1 billion - 50) loops, even when the loop is empty (passing).
Is python out of the question? Am I missing some pattern that allows me to skip iterations?