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 approach and clean. :)
Cheeky
This comment is hidden because it contains spoiler information about the solution
I have the same solution, but I kind of guessed it would work and have no idea why.
Could anyone explain the maths behind this solution? (If you do, please don't forget the spoiler flag)
too slow
The description states that the condition for performing changes to the array is
for any i, j pair.
12 > 12
is false, so no changes are made to the array, which is then summed: 12 + 12 = 24 as expected.That is just an artifact of how the test results are printed, it's not an error in your solution.
Yes. Lists, as the error states, are unhashable (because they can be mutated and thus their hash would change and that is bad).
lru_cache
's docs state:yeah same here
why I cant find fractions module when using pycharm
Excellent and concise solution!
I did the same thing and it timed out.