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.
Around 2100 ms with Python 3.
I got 2258ms with PHP.
I'd recommend having a look at primality tests. My favourite is 6k±1 because of its simplicity.
Time: 2707ms on Python 3
My code is in Haskell and I presume there might be something wrong with random tests of this problem. I think my code is fine but I got this error "Falsifiable (after 25 tests):
Positive {getPositive = 10}", and I have no idea what it is for. That'd be greatly appreciated if someone can help me out here.
Guys, what's ur speed on sample tests, specially on PHP?
In my case it take for 4.43ms and its taking too long for full test suite. I haven't done this kata yet but i have no idea how to more speed up my code.
This comment is hidden because it contains spoiler information about the solution
U have 60 instead of 20
Failed asserting that two strings are equal.
Expected: '7000000000000000000 + 400000000000000000 + 20000000000000000 + 6000000000000000 + 100000000000000 + 60000000000000 + 4000000000000 + 500000000000 + 40000000000 + 1000000000 + 100000000 + 60000000 + 9000000 + 300000 + 30000 + 6000 + 300 + 20 + 1'
Actual : '7.0E+18 + 400000000000000000 + 20000000000000000 + 6000000000000000 + 100000000000000 + 60000000000000 + 4000000000000 + 500000000000 + 40000000000 + 1000000000 + 100000000 + 60000000 + 9000000 + 300000 + 30000 + 6000 + 300 + 20 + 1'
Well.. what to do now? It's PHP and i have no range in int/float to write "7000000000000000000"