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.
^^
Approved
python new test framework is required. updated in this fork
Taking it away would make this a physics problem, not a programming problem.
I think putting the formula in the description kinda takes the whole challenge away?
thanks,I was struggling .I got it.
oopsie! sorry about that. will check that :(
Check kata Details tab, near the bottom:
Print the input using
console.log
see why your code fails. The log appears above the test result.9th and the last test cases are failing for the JavaScript submissions. I wonder if any test case issues. Wonder if anyone completed the js version?
Hi, I am facing same problem as above. 9th and the last testcase is failing during the attempt. Seems weird as it most of the test cases and there is no mention any other condition or criteria in the question.
The str.strip() method will actually remove all leading and trailing whitespace by default--including spaces, tabs, newline, return, and formfeed.
link: https://docs.python.org/3/library/stdtypes.html#str.strip
I don't think the perfomance gained from returning after 5 results is worth it in this case, the algorithm is still of the same time complexity, and I think it looks cleaner this way.
I took the same route with sieve of E and also tried atkins sieve, but thanks to this comment I was able to clarify a guess I had and the solution was obvious. Frustrating as hell to work on, but I can say that it's definitely a lesson learned when working with large numbers and what the JS engine can handle. Thanks for making me learn :D
Thanks for the hint :P
I will try a fresh set of eyes. God, I've spent some time factoring the code.
:D
Loading more items...