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.
It is not the servers.
Misread instructions, forgot that negatives are arbitrarily not considered prime, and was using Math.abs to simplify things.
Edited to new issue. Language is JS.
you must be misreading the logs
running your javascript code without the line that hardcodes for 5, the error message is
5 is prime: expected false to equal trueso, your code is wrong regardless
You tell us what language you are trying and show us your code, so we can reproduce your error and see what you are getting wrong.
Instructions say looping up to n/2 would be too slow, I've gotten my algorithm down to roughly n/6 but still timing out at 12000 ms. Is this a problem with my code or with the servers?
C#, then i run the test button it tests 0, 1, and 2. they all pass on test. So i went to run the attempt, the last 3 test numbers are 0, 1, 2 and they fail with no code changes.
Where? How? In what language? What is your code?
descriptions says positve numbers can only be prime, but "answers" differ.
numbers in test and attepmt ACT DIFFERENTLY
There is a specific note about performance in the description. So, you should not complain about something that was explicitly given to you upfront and you still decided to solve the kata anyway.
I didn't really like this Kata. If there had been a realy large number in the sample test as well and not only in the hidden/submit test it would have been fine.
The real challenge is not to check for prime numbers, it is to check for prime nubers in a efficient way without running in a timeout on codewars.
fixed
Your code must me too slow if it doesn't pass. And we don't read minds, so if you want help with your code, you should show it to us. Follow this guide: https://docs.codewars.com/training/troubleshooting#post-discourse
Do you know what that'd be? I tried a few.
Not doing this one for a while.
Ridicilous this fails because it took like a second lol. Everything else passed.
No, you can't submit unless you pass all the tests in the alotted time. You need a faster algorithm.
Loading more items...