Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
nice to know this
This comment is hidden because it contains spoiler information about the solution
I also dont understand it
em
i don't know
Generator wow... spicy!!!!
I tried to calc the 2n term directly from the cloused form formula but the numbers are too big for the standar float, and
are too big too for a reasonable precision of the decimal module. I tested some numbers and the calculation get too long
before getting the needed precision.
So the best way is using int. I did a raw for for it. The interesting of this solution is the use of a generator that improve the readability a lot.
This is O(n^2) in time isn't it? It requires computing all n+1 Fibonacci numbers. But given andreidemin's comment, you only need one Fibonacci number.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks
I love it.
Amazing!
This comment is hidden because it contains spoiler information about the solution