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.
This comment is hidden because it contains spoiler information about the solution
Do you mean your code works fine in that case and fails in another? In which one, what's the input and what does your code return? If you post your code, follow this guide: https://docs.codewars.com/training/troubleshooting/#post-discourse
I know but in this case if my code is doing the correct process in the first case (with the lower number) where these repeat, why is it wrong in the case with the highest number ?
I appreciate your answer.
It's explained in the description.
I have a problem with the "SumPositivesWithDoubleMax" is it that the same numbers shouldn't be counted or why in your examples { 1, 1, 11, 2, 3 } => 6 you only discount one of the numbers one an the other you sum. Why?
I can work it out in IntelliJ, but for some reason it did not work in this test.
So why can't ChatGpt solve it?
I was trying with the same number of bits but now I find the problem, no rule says we need to have the same number of bits.
Thanks for your answer.
And how many 1s has 256 in binary? You have to return the next higher number with the same amount of 1s in its binary form. 128 has 1 too.
But if the number 128 in binary has only one "1", why did you put the correct answer is "256" when in this case "256" in binary is "100000000"?