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.
This comment is hidden because it contains spoiler information about the solution
You have to multiply two numbers to get to the target product, but you're only adding one of them to your list ;-)
Every time you find a divisor you're throwing away the other part of the information ;-)
Why
result
belongs to the class? The next time your function is called it'll have the previous value, that's why you getexpected: 0 but was: 3
. Not a kata issue, it's your code that should be fixed. Try calling your function several times in eclipse too, it'll also fail there.The assertion with 39 is this one:
assertEquals(3, Persist.persistence(39));
and it's ok. I've solved it in java and it worked fine for me.