Code Length Check And Simple Anti-cheat Tests
Code length should less than 48 characters.
Log
Your Code:
countWord=s=>###########################
Test Passed: Value == 'code length = 45, code length check passed!'
Completed in 1ms
Completed in 6ms
Basic Tests
It should works for basic tests.
Test Passed: Value == 1
Test Passed: Value == 1
Test Passed: Value == 1
Test Passed: Value == 1
Test Passed: Value == 0
Expected: 1, instead got: 0
Expected: 2, instead got: 0
Test Passed: Value == 1
Test Passed: Value == 1
Test Passed: Value == 2
Test Passed: Value == 3
Test Passed: Value == 1
Test Passed: Value == 2
Test Passed: Value == 2
Expected: 5, instead got: 4
Expected: 2, instead got: 1
Test Passed: Value == 3
Completed in 2ms
Completed in 3ms
100 Random Tests --- Testing for correctness of solution
It should works for random tests.
Log
Testing for:
s = "wrwaOkrgriRdrrw wOOOyd wOrOoWRDGrOUwodRoO oYoRRldRoOJOROOWWrRvWgrWDwrW DKwLOjYOrWwWwdOdMODArOOMcN"
Expected: 4, instead got: 3
......................
........................
...............
As you can see, your code length = 45, not 48
But your code missing something, thus, the result is incorrect.
So, it's your issue, not kata's ;-)
Having your kata translated into multiple languages (JavaScript, Ruby, Python) opens your kata up to more potential coders.
I believe the people with high honors (3,000+) should be incented more to search through and complete more beta katas as well. It will help get the more difficult beta katas through their processes and out of their limbos.
For the reference solution, you can use Number.toExponential if you save it under a different name (security by obscurity, yada yada). That would save you a lot of trouble.
I've done some cleaning up of the description. Fixed some spelling, some grammar, and some markup. Should still look more or less exactly the same. Hope you don't mind.
Don't confuse so easily. Closing.
Me too.
I managed to do it through pure logic. I can't say if my solution is the most efficient, but it was successful without any guesswork.
It is in little-endian order, so
00010010
is actually72
.No, it's not.
copy&run your code:
As you can see, your code length = 45, not 48
But your code missing something, thus, the result is incorrect.
So, it's your issue, not kata's ;-)
It means "X" shape/pattern. I used 3 examples to explain this.
Is that better? :-)
erm, give me a min :-)
Yeah, I read that afterwards :-), not a problem :-)
Happy you liked it !
Rounding issues seem fixed for now.
; ) )
Having your kata translated into multiple languages (JavaScript, Ruby, Python) opens your kata up to more potential coders.
I believe the people with high honors (3,000+) should be incented more to search through and complete more beta katas as well. It will help get the more difficult beta katas through their processes and out of their limbos.
For the reference solution, you can use
Number.toExponential
if you save it under a different name (security by obscurity, yada yada). That would save you a lot of trouble.I've done some cleaning up of the description. Fixed some spelling, some grammar, and some markup. Should still look more or less exactly the same. Hope you don't mind.
Needs a fixed test for
shorthand(0)==="0"
. Unless you don't want that.Loading more items...