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.
updated to Python 3.11
i think this has the first two conditions, but the upper limit may need to be added
Rejected, see comments under the translation for details. Feel free to fork the translation, fix the issues, and republish.
Don't worry, glad you learned something new.
Go to Solutions, see how you can use regular expressions to solve this kata. In some languages you'll find more than in others.
Why? You can use regular expressions if you want, you're not forced to do it tho.
Added
__bool__(self)
toNumber
class with the same definition as__nonzero__
.This comment is hidden because it contains spoiler information about the solution
Removed deepcopies... divided by 2 the time needed... x) Only pretty inefficient solutions wouldn't pass, now.
I updated the default version to 3.6 at the same time.
confirmed (about python)
note: changing all the
copy.deepcopy
in the test suite to handmade functions should resolve the problem (this module is f..king slow)Ths sounds language-specific. It would help if you specified which language has this problem.
( Let me guess: it's Python. Python seems to have incurred a slowdown somewhere during a platform "upgrade". )
The input never overflows, and while running 1k tests (just to be sure) not a single negative number was generated. Your code is the source of the problem.