Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    Because your code is throwing a string instead of an error. Google a little or search MDN docs.

  • Default User Avatar

    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?

  • Default User Avatar

    I can't belive it, I go throught. c++

  • Custom User Avatar

    python random tests have \n endings, sample tests doesn`t.

  • Default User Avatar

    thanks for your efforts !

  • Custom User Avatar

    Should be fixed.

  • Custom User Avatar

    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.

  • Default User Avatar

    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

  • Custom User Avatar

    I already found that my solution is wrong. But it seems that any solution "passes" the tests.

  • Custom User Avatar

    Can you paste your solution?

  • Custom User Avatar

    Nim tests are broken, all tests pass, but solution is rejected because of "Exit Code: 1"

  • Custom User Avatar

    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!)

  • Custom User Avatar

    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.

  • Default User Avatar

    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...