Ad
  • Custom User Avatar

    There are no errors in the test cases. Control your program.
    On some tests you have a problem. I tried your solution (after completing things that were missing). You don't have thought of particular cases and on these cases your code fails and give you

    System.IndexOutOfRangeException : Index was outside the bounds of the array.
    

    Write a function to print the input (a long[,] array) and then I think you will be able to see the flaw in your code.
    Consider yourself as happy: usually I don't examine the code... I don't have time for that. I hope you will succeed.
    PS: here a markdown guide, in particular for showing your code:
    https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code

  • Default User Avatar

    Again, the test don't fail, I only get the error message that I put in my first post. That error message is just 3 lines long. I did not hear of Markdown before but after googling it I came across Dillinger that I think uses Markdown converts the 3 lines to 1 line:

    System.IndexOutOfRangeException : Index was outside the bounds of the array. at Fracts.convertFrac (System.Int64[,] lst) in :0 at FractsTests.Test1 () in :0

    Hope that helps you track the error in the Test1 class

  • Custom User Avatar

    I don't need your code, I don't have enough time. Rather give me (between 2 lines of 3 backticks, otherwise it is unreadable; if you don't know that, google "markdown") what you exactly get when the tests fail.

  • Default User Avatar

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

  • Custom User Avatar

    In test1 of "Run" (Your test cases) there is only one "subtest". In "Submit" there are 8 tests. You can succeed in subtest1 of test1 but fail in one of the 7 other tests. Print the input to see what is going on in your code which caould have a bug. Be sure that there are no errors in the tests.

  • Default User Avatar

    Then how do you explain that the solution compiles fine and the test passes, see this screen shot: https://gyazo.com/b1758e407d465130c11b85c8b50da267? But it then fails to compile when the tests in the Test1 class that I cannot see are added (when I submit). I also get the error message which says there is a problem in the Test1 class: https://gyazo.com/8b63f384fb8c06fe889110f23318edb3. I fail to see how this is not pointing to an error in the Test1 class. I am happy to send you my solution for testing.

  • Custom User Avatar

    It would help if you showed the steps in the middle. Just showing [N_1, D] and then [N_n, D] doesn't make any sense to me. Show me what happens in between.

  • Custom User Avatar

    I just tried a few solutions at random amongst the passing solutions and everything worked fine. I can't see any error in test 1. The tests are the same in all languages and lots of Codewarriors passed the kata in C#.

  • Default User Avatar

    In C# my code passes the provided test case fine and it runs fine on my computer in VS too, but when I want to submit I get the following compilation error:

    System.IndexOutOfRangeException : Index was outside the bounds of the array.
    at Fracts.convertFrac (System.Int64[,] lst) <0x401defe0 + 0x00223> in :0
    at FractsTests.Test1 () <0x401dead0 + 0x00131> in :0

    This seems to be a clear error in the Test1 class which I cannot see. Could you please check?

    Thanks

  • Custom User Avatar

    With the previous version of C# at Codewars it passed but the new version is very strict... I suppressed the unused line, should work now.

  • Default User Avatar

    In C# all the 4 visible tests are passing and it runs fine in Visual Studio too, but when I click "Submit" I get the following error message:

    Compilation succeeded - 1 warning(s)

    {"stdout":"","stderr":"/tmp/csharp116429-21-ibjr83/fixture.cs(8,8): warning CS0414: The private field `FinanceTests.randomGenerator' is assigned but its value is never used\n","wallTime":0}
    Unknown error

    This seems to be some type of bug that exists in the FinanceTests class that I cannot see. Could you please look into it? Thanks