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.
Best solution is always if somebody else can easily read it. The only reason that would not be the case is when it slows down the code noticeable, but then you would probably not use python anyways...
As a beginner, it's more readable than solutions using ord().
long
is 64-bit, no problem here.Also .index() uses a linear search to find the letter in alphabet in every iteration...
A comment a week ago by @l4cr0ss made the same complaint, but it turns out
long
on the test is a 64-bit integer, so this shouldn't be an issue.The display is mangling your solution (losing all the
<XXX>
) so it's not obvious why it's not working for you.This comment is hidden because it contains spoiler information about the solution
Same here. Not sure who voted it 'Best Practices'...
Oh. And here I thought I found a conspiracy ^^'
It's just because I wrote the solution using a mobile phone.
Every time I type a character, will add a newline..
But the code works well, doesn't it?
^_^
Maybe a solution in Whitespace is hidden somewhere in here..?
This comment is hidden because it contains spoiler information about the solution
The C++ version has return type of long on the function, which makes tests fail with overflow issues. IMHO you shouldn't be required (or expected) to change types in provided signatures.