Ad
  • Default User Avatar

    This should also pass with "D:", which is the opposite of a smiley! :)

  • Custom User Avatar
  • Default User Avatar

    Same issue on C# VS

    Case 14
    Expected: 21.25d
    But was: 1432.0d
    VC Console: 21,25

    Case 17:
    Expected: 7.7320000000000002d
    But was: 179.19999999999999d
    VC Console: 7,732

    Case 18:
    Expected: 7.4562499999999998d
    But was: 14.0d
    VC Console: 7,45625

    Case 19:
    Expected: -12042.760875d
    But was: 307538640.0d
    VC Console: -12042,760875

  • Default User Avatar

    I assume my program is working correctly in C#. But I got a timeout. What would you recommend me to do? Thanks!

  • Default User Avatar

    Thanks for the feedback :), I've corrected the code.

  • Default User Avatar

    This code is wrong, and test should be adapted. Because of "1,3,2,4" --> is not ascending!

  • Default User Avatar

    I didn't downvote your post...
    Fixed tests have the following form:

    [Test]
        public static void test1() 
        {        
            int[] lst = new int[] {12, 15};
            testing(lst, "(2 12)(3 27)(5 15)"); 
            
            lst = new int[] {15,21,24,30,45};
            testing(lst, "...");     
            
            ... other tests ...
        }
    

    Since you have already passed some of my kata with C# have a look at the tests and you will see how they are built.

    Hi, on linqpad my code works fine. But here I get <string.Empty> as a result. Why could this be?

    Because on linqpad the input you give is wrong as I already said.

  • Default User Avatar

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

  • Default User Avatar

    I already answered... When you wrote: "12, 15, ..., -72769, -31744" you wrote your printing of the inputs of several different tests included in "test1()". If you want to have clearly each input of each test you have to print some separator after your lines:

    foreach (var item in lst)
          Console.WriteLine(item);
    

    I think you are at CW since long enough to understand that:-) BTW before posting issues have a look at the top of the page: 795 out of 12,246 passed the C# kata; if there were errors somebody would have seen them before you, all the more that the fixed tests are the same in all languages. Moreover there is no need to repeat a wrong issue and to downvote my previous answer... Good luck and cheers!

  • Default User Avatar

    @g964 Hi, could you please have look at the question two days ago. It is not resolved. :(

  • Default User Avatar

    This issue is not resolved. The test is given by CodeWars, not by me. @g964

    Downvotes without answers are useless. ;)

  • Default User Avatar

    @g964 But some of the test are working. I put seven tests in one? But I use the test cases of Code Wars.

    Downvotes without answers are useless. ;)

  • Default User Avatar

    The input you give is wrong: you are putting 7 tests in only one...

  • Default User Avatar

    I am not sure if correct, but the route is depending of the places you visited before.
    If you first travel A --> B --> C than you can't just copy the distances if you travel from A --> C.
    Do you understand the problem?
    So the Kata makes logically no sense to me.

  • Default User Avatar

    Hi, I am using C#.
    For number 21 the prime number 7 is not listed in the results here. Did I do something wrong?
    The input numbers are following.

    12,
    15,
    15,
    21,
    24,
    30,
    45,
    107,
    158,
    204,
    100,
    118,
    123,
    126,
    110,
    116,
    100,
    -29804,
    -4209,
    -28265,
    -72769,
    -31744

    Desired output is: //"(2 -61548)(3 -4209)(5 -28265)(23 -4209)(31 -31744)(53 -72769)..." ---> no (7 ...) occurs!

  • Loading more items...