I feel like this is the epitome of python programming - extremely consise but unreadable, however demonstrates elite levels of knowledge in the language. Beautiful solution.
Perfect iterators!
I think four conditions should cover everything.
In order not to miss anything, shouldn't the exceptions be caught around each condition separately?
you will compute the sum of squares of Fibonacci numbers
I suggest :
Consider the sum : S_n = F_0^2 + F_1^2 + ... + F_n^2, where F_0 = 0, F_1 = 1 and F_{i+2} = F_{i} + F_{i+1} for i >= 0 , you must compute the last digit of S_n
Nice coding challenge of the Fibonacci series by the way.
Don't see any point in using "math/big", as int64 can hadle all test cases for n <= 600.
Btw,
int(times) if times else 1
can be reduced to
int(times or 1)
I feel like this is the epitome of python programming - extremely consise but unreadable, however demonstrates elite levels of knowledge in the language. Beautiful solution.
Approved
python new test framework is required. updated in this fork
This is so clever but I'm not even going to begin trying to understand what's going on here :p
Can't complete the solution with more than 10 lines of code, the code always times out :(
Perfect iterators!
I think four conditions should cover everything.
In order not to miss anything, shouldn't the exceptions be caught around each condition separately?
Very similar to https://www.codewars.com/kata/56b7771481290cc283000f28
has been updated some time ago.
Very well! :)
This comment is hidden because it contains spoiler information about the solution
Edited.
The following statement is a little misleading
I suggest :
Loading more items...