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.
I like how Best Practices and Clever buttons are useless cause here we see ppl think using eval (which is banned/discouraged everywhere) is kinda cool.
you & me both pal haha
Nice way to solve
“Its the not the Destination, It's the journey.” - Mao Zedong
lol cheater
Going
> 20
turns this task in converting a number into words, so that would make it a duplicate. And specifying how to count the characters would then spoil the puzzle too.Also, why are we still discussing this when the kata should have been unpublished?
The solution to this, OP, is forfeiting the
C++
version of that kata, then translating it with the code from this one ( and unpublishing this kata ).This should not be a separate kata.
No, random tests with higher numbers of knocks.
It's too easy to reverse engineer the number of knocks by running tests and seeing expected values ( that's what I did ). The function domain is simply too small.
If you have to reverse engineer, say, ten thousand possible inputs, that'd become prohibitively time-comsuming. Increase the number of random tests to
100
or200
, and you have to have practically the whole range.You could do
1
to20
in fixed tests, so people have some results to discern a pattern, but have the random tests go higher ( and there could be fixed tests for higher numbers as well. but I'd do those after1
to20
).Do you mean more random tests? I put in 50 now.
Not enough tests. Look at the solutions ?!
Duplicate.
@Toisen:
String.replaceAll
is currently not a standard Javascript function and will return an error in Node.js (see https://node.green/#ESNEXT-candidate--stage-3---String-prototype-replaceAll).It may have been implemented in Chrome and will work in your browser console, but nowhere else.
It's a non-standard function that is available in Chrome and not on CW.
read the error message
TypeError: str.replaceAll is not a function
What is
replaceAll()
?Loading more items...