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.
Good point, thanks for the suggestion.
Glad it helped, the kata is nice!
You can check mine out, although pretty sure there are better ones out there.
This comment is hidden because it contains spoiler information about the solution
Ok so I did have a mistake in my code, I fixed it and now it passes everything. But when it didn't it had incorrect description for some of the tests. For example:
Testing for:
product = 172
✘ Expected: 22, instead got: 4
My answer is wrong here as well, but the test should expect -1, not 22. Weirdly, when I corrected my code everything passed. So the problem seems to be not in the tests themselves by somehow in the description.
EDIT:
Posted my old code so you can replicate the error. Maybe just worth double-checking those tests. I think you can narrow it to the cases when the expectation should be '-1'
I pass all the example tests, but when I click submit it fails for one digits as shown above. E.g. it expects 23 for 6
Very interesting kata! But what about single digits? I keep getting failed tests like this:
Expected: 23, instead got: 6
If the product is 6, the smallest integer should be 6, or, if you want at least 2 digit number, 16, or am I missing something?