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.
What are we supposed to return for if there are no values (in C#)?
new long[0];?
List<long[]>{ new long[0] };?
I got all my successful cases working, but the null ones I'm not sure what they're asking for.
Because your code is throwing a string instead of an error. Google a little or search MDN docs.
I am getting this Error - 'Error: the string "Expected New Average is too low" was thrown, throw an Error :)'. Any idea what does it mean?
I can't belive it, I go throught. c++
python random tests have
\n
endings, sample tests doesn`t.thanks for your efforts !
Should be fixed.
The code helps so I do not have to write my own solution in a language I do not know :) I can fork the Nim translation, but it would be helpful to have OP's code to use it as reference. I assume that the translator's solution works in the current setup, but it's useless for fixing because it's possibly just as broken as tests.
Anyway, I will take a look and try to fix.
it doesnt matter what the code is, there is something wrong with the Nim version. I've played with it a bit and it seems like assertions cannot be wrapped in a function, it makes them automatically succeed for some reason, but when the tests finish it spits out the error message from the OP. not sure what is going on, i dont know Nim
I already found that my solution is wrong. But it seems that any solution "passes" the tests.
Can you paste your solution?
Nim tests are broken, all tests pass, but solution is rejected because of "Exit Code: 1"
Does this happens after you click TEST, or ATTEMPT? I cannot recreate your problem and tests look fine to me. If your problem happens after clicking TEST, I think that you accidentally modified sample tests. To fix the problem, click RESET under the trainer and see if this helps (remember to backup your code first!)
I could not run the tests when solving this in Kotlin. The a in assert is missing (ssertEquals instead of assertEquals) which break the test. Solving was not an issue on the other hand.
That's the most difficult 5 kyu Kata I've solved so far. It can not be done straight forward because of huge k. Need to find optimal algorithm wich is not a trivial task. I would consider it as a 4 kyu Kata.
Loading more items...