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.
You need not to go from
1
up ton
. You should find an optimal stopping point / upper-boundary where you can obtain all te divisors ofn
.I am afraid you should read again the description. This test is the same in all languages.
This comment is hidden because it contains spoiler information about the solution
Any arithmetic/bitwise operator (except
+
(unless it's unary) where strings take precedence) converts operands to numbers. For better understanding ofsort
you can check out MDN docs.This comment is hidden because it contains spoiler information about the solution
nope, not at all. ;)
It is a bad practice to have a 'magic number' in a code, here it is 6
the star operator unpacks the sets into individual arguments
Not needed but it's up to you.
Thank you, I'm glad you enjoyed this kata.
The description already lets you know "If you hit any walls or go outside the maze border, you should return Dead."
Time it?
This comment is hidden because it contains spoiler information about the solution
You could try, but you'll also need to change more than that to make your code work.
The part that's checking for ending
0
s indeed looks incorrect.x[i:]
by itself does nothing. Slicing creates a new string (no changes to originalx
), but you're not saving it to a variable.if
block. It doesn't really check for'0'
anywhere. You should try using some string methods that python provides. (len, replace)re
module)Good luck!
Your code skips values like that. And mutating the input is bad practice. See what your code does here.
Loading more items...