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.
In Java basicTests() expected and actual values are swapped.
Program random test always expects a number 1 unity bigger than my answer, but when i use a numeric bases conversor it always gives my answer
Python: The length of the string is not needed as a second parameter and can be ignored in a working solution.
Already raised as issue
All done some time ago
Language: C++
Test suit missing the required header
std::string
using namespace std
is redundant.i figured it out,just had to use a larger data type.->long long
Expected: equal to 36028797018963967
Actual: 36028797018963968
am getting this error even though i think my programs logic is good
Description should be language-agnostic
Approved.
In the description, it's written that we have to:
"return the corresponding number (after keeping only the '1's)."
And then, in the examples below, it's written:
Correct me if I'm wrong, but after keeping only the
1s
, we would be left with an empty string (""
), and if I understand your examples correctly,corresponding number
means the binary corresponding number in base 10 (decimal).So, the corresponding number for
""
is not0
, it's an error.If you want us to specifically return
0
for a certain case, you should list it as the return values you expect from the function.C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )Scala translation
This comment is hidden because it contains spoiler information about the solution
Loading more items...