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.
fixed
I'll fix it!
Description changed. I think it's more proper to still have the minimum amount of words needed for any max to be
base
.Oh, I thought that even if the
max < base
you would still have words for the leftovers of the system from a proper understading of the system itself. But you both are right. In the way I defined the problem before it makes more sense your wayDone in above fork
Approved
The reference solution is incorrect. Here is an example:
base = 7
,max = base ** 3 - 1 = 342
. The reference solution returns10
. But the correct answer is7 + 2 = 9
sincemax < base ** 3
.There are tests where
max
<base
, but with the wrong result, e.g.:The number of words needed to read numbers up to
4
is 5 (including0
) or4
(excluding0
), not 10.Same bug in random tests.
assert.strictEqual
instead ofassert.equal
max
<base
? I think this case should be valid..
Approved
Update Fork
tester(26, 40, 33)
test (since it goes against the input constraint)resolved
Resolved
Loading more items...