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.
I thought the parity question would make it different enough to be worthwhile/interesting, at least for beginners. Apologies if not.
Duplicate of all the factorial katas
Strong agree. The problem it is equivalent to is 7 kyu, but unless you know that (or realise it quickly)...
This is really a maths problem (and not an easy one), not a coding one. It says nothing about your abilities as a programmer.
I typed
python *mycode*
in the previous comment. Which is exactly earlier. Please let me know if the problem still persists.C Translation is ready (author is inactive).
Also, the random tests in C# seem really bizzarre, and I don't think they're doing what the author intends. They appear to be running 7000 tests over the same set of 2000 arrays, and none of the test sizes come close to the JavaScript performance tests. I'm hesitant to change them, though, as many existing solutions could start failing due to signed integer overflow.
ah yes, my mistake. the OP had a previous post where the code would sometimes pass. then that code was edited several times, so I've lost track
It's not the indentation, it's the lack of initialization.
Hi @opeth22, your code indentation causes this:
UnboundLocalError: local variable 'answer' referenced before assignment
, so repost your code with the correct indentationThis code gives the answer of the missing number but also gives the timeout error. Need help!
This comment is hidden because it contains spoiler information about the solution
I did it with callback function but it solution had problem with memory. I broke my mind. I have red a tip that I have to think about math solutions. Done.
could be that
list
is too much? someset()
related methods can work, but then, there are other approaches to the problemYour solution must be printing stuff.
are you printing a ton of stuff?
Loading more items...