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.
Can someone please explain me this piece of code? what is id?
shoot thats actually ki nda crazy
There doesn't seem to be a test for the color argument.
My solution was able to pass even though it always set the cells to '⬛'
I'm a little late but your response made me curious. I inititially would have agreed with you, until I put it to the test. I think your statement is only valid for small numbers and/or small prime factors, though.
I tested both solutions with 1000 random, unsorted numbers. The results: This solution took about 29 seconds and your solution took about 22:30 minutes with the same numbers in the same order. This is mainly due to two cases with large numbers, where the prime factors where either only two factors or the number itself. These took 7:30 minutes and 14:42 minutes respectively. So I guess, this solution is not that bad after all, is it?
Though one could improve it a little with the usage of StringBuilder, a while-loop instead of the for-loop and by checking 2 and only the odd numbers afterwards.
its called aliasing..
number_to_string = str
its like instructing python that str has another name as well, namely 'number_to_string'.
That is correct. This solution functions correctly only because of the constraints specified. If the initial value is 10 then no matter what I do, my opponent can force me to lose the game, so I know that I will never recieve 10 as an input.
@SnickersTheCat, you are right, but the description specifies
but you have a friend in judging who has excluded all hopeless initial l values for you
, so a losing value will not be tested.does this return 0 as a value which would be out of range?
when I pass 10 as length it is retuurning 0 which I would think would be outside of the allowed test values
This comment is hidden because it contains spoiler information about the solution
:D thanks
There, it's unpublished now.
Robo P, there was absolutely no reason to keep it up.
Duplicate
Duplicate
Why not immediately? I was able to submit a solution on my phone meanwhile, and I should be downvoting the kata now for reasons mentioned above.
Thank you for pointing this out. I will take this kata down soon.
Loading more items...