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.
Ditto
Nice, but no need extra list and l variable
it wont work right if N is odd and y is even, I think
1 foot is equal to 12 inches
because the decision is old enough I think
i've done this kata without an empty list and it works!
That was pretty helpful thank you! fixed it
The whole array.
What range gives you 155?
Added one fixed test to all languages.
thank you for the heads up! I'll study the solutions to check what went wrong
At least in javascript (maybe in more languages too), it lacks fixed tests were the expected result is the sum of all numbers, and this allows incorrect solutions to pass.
Your code is incorrect for inputs like this one:
[ 7, 4, 11, -11, 39, 36, 10, -6, 37, -10, -32, 44, -26, -34, 43, 43 ]
This is the error message:
Expected: 155, instead got: 148
You can see 155 is the right answer adding all the numbers.
Oh! my bad. Now knowing that it's random I just attempted it again and it passed ¯_(ツ)_/¯.
Thx!
If it is random, we can't help you, it'll be different every time, try using
console.log()
to print the input yourself, it'll appear above the test result.Loading more items...