6 ms·
another interesting fact: if you have to compute the fib of very large numbers mod n. you can use the fact that the fibonnaci numbers would repeat.( see: https
by Yessing 7y ago
another interesting fact:
if you have to compute the fib of very large numbers mod n. you can use the fact that the fibonnaci numbers would repeat.( see: https://en.wikipedia.org/wiki/Pisano_period https://en.wikipedia.org/wiki/Pisano_period)
<spoiler>
this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/ https://www.spoj.com/problems/FIBHARD/
<\spoiler>
- adas0693 7y agoThank you for the comment. Will check it out.