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.
Oh nelly that was a tough one. But on the brightside it brought me back to my school days of doing maths. Was stuck on about 150 characters for hours.
Thanks for checking mate. I'll give it a go
I assume that this isn't a case where there is some simple mathematical trick that if you know makes this a very easy kata to code? I ask as there's usually not a whole lot to learn from those sort of challenges (coding wise at least, though they can be interesting for those into maths theory etc) and I don't want to spend hours and hours on this only to realize there was some two line solution that uses a theorem I could have just googled. Thanks in advance
Wow your code is about 10% the length of mine but finishes in about 1/3 the time. Kudos
Thanks for suggestion. It doesn't seem to be working for me but thanks for replying anywyay. I'll see what I can do
Thanks. For some reason with my code in its current form the following happens:
This makes no sense to me. For some reason unless I force it to skip the single solution tests, it gets stuck there. Does anyone know why this might be please?
It is frustrating that my code keeps timing out without any indication as to when it was that I timed out. By using older code I am able to see the 10 invalid tests but for some reason I don't even get that far with my new, better code. I know it is better because I ran the invalid tests in Spyder and pass them much much quicker than the older code.
Does anyone know where I can access the random tests please? Also, is the 12000ms limit the total time limit or the time limit per test section? Thanks
I got the exact same results as you on the tests you mentioned. For "wfcairbxklyqnhupvmes" I got "myxwvusrqpnlkihfecba" and same for the second one. Do not know if we are wrong or the solution is wrong.
I borrowed the sieve from elsewhere online (have credited original creator) -this just allowed me to list primes below n to save iterating through non primes. The rest is mine.