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.
This comment is hidden because it contains spoiler information about the solution
There's an easy theorem about a sum of cubes that says it is equal to the square of the relevant triangular number. Using that, it should be fast to calculate the test in O(1) time.
That is really, really clean. Very nice.
Hi! It's probably an issue with a string formatting you're using. I tend to avoid them, but there's a use case for everything. This post might be helpful:
http://stackoverflow.com/questions/18053500/typeerror-not-all-arguments-converted-during-string-formatting-python
If not, you can always post a code snippet marked as a spoiler and then people who have finished can take a look and possibly help advise.
Also, check that the versions of python match up. I'm pretty sure Codewars is running 2.7.3. Cheers!
Tests are wrong, as others have pointed out. %r should be %a. Description is entertaining, and relatively clear, but could perhaps be sharpened a little.
Other than that fun idea.
I really like this. Well done using the input to index the next state, that's clever.