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).
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 indentation
UnboundLocalError: local variable 'answer' referenced before assignment
This 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? some set() related methods can work, but then, there are other approaches to the problem
Your solution must be printing stuff.
are you printing a ton of stuff?