Ad
  • Custom User Avatar

    Then, in my opinion, if the order is important to the solution (which it obviously is) this should be stated in the description of the task. At least as a hint.
    The diff isn't really helping finding the source of the problem when the order isn't correct (just too many results to really get a sense of what might be the problem).
    Even considering that the order isn't defined when not specified in the statement and that then the source of the error isn't the script but the server itself?!

  • Custom User Avatar

    The order of the rows seems to be important. My first solution was technically correct, but had the EU sales first and then US sales, which resulted in the solution being wrong. Is there a way to make the tests order-independent?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    In your ternary in the else part, you are missing the .reverse().toString() on the StringBuilder instance.

  • Custom User Avatar

    Still, returning a function from within a function, also sometimes known as a delegate (like in C#) is a basic language feature.
    8kyu really might be too difficult, but i think it shouldn't be any lower (or is it higher?) then 7kyu too.

  • Custom User Avatar

    Thank you for the code for the header. It seems that it is contained correctly in the discription but while writing my translation, it didn't display correctly in the preview.
    We'll see if it works once the translation is accepted (once you can see it, that is).

  • Custom User Avatar

    C# version kumited.
    Unfortunately, it looks like my changed description destroyed the top part (info about series) and I have no idea how to fix it.

    Remark: I made single tests instead of only two tests with multiple asserts like the Java version, since that's how it "should be done" in C#/NUnit.
    Also, i wrapped every test body in Try/Catch with an Assert.Fail() in the Catch because codewars just ignores tests containing exceptions, sometimes resulting in "valid" solutions that just contain a simple throw new Exception();.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    C# version kumited
    some more test cases, but no random test case
    also I added a rule (for now only for C#) for inputs smaller 1

  • Custom User Avatar

    C# version kumited
    i also made single tests instead of using one big test with multiple asserts
    and i added one more test to the final tests

  • Custom User Avatar

    C# translation kumited.

    (Description modified)

    I had to omit one test case (based on Ruby test cases) with the [nil] Array.

  • Custom User Avatar

    The requirement isn't asking for the time (in days) he needs to read the book but the integer representation of the day of week when he finishes the book (finished on a Monday (1) and so on)

    So, reading a 2 page book with 1 page each Monday, the result is 1 because he finishes the book on a monday.