Ad
  • Custom User Avatar

    ??? returning reference to stack variable ???

  • Default User Avatar

    I have the same problem. Don't know hot to submit...

  • Default User Avatar

    123.045.067.089 afaik is perfectly valid.

  • Default User Avatar

    Really hard to understand the description...

  • Default User Avatar

    Me too has passed the test as it was. I'd like only to warn about this difference in the last test.
    Some other languages or differet ways to count the times could led to different results clearly.
    Nice job anyway.
    Cheers.

  • Default User Avatar

    Guys passed the C kata as it was, not tricky:-)
    Nevertheless I removed the comma. Please tell me if it fits you now.
    Cheers!

  • Default User Avatar

    Hi,
    there's an error in the last random case. I'm using C code and counts the number of imput times using the number of spaces +1. This work for every case except the last (the random one) because in this test the last time is followed by comma and space. It can be easily solved but is triky. The description sais "no surprise in the input format" so I think this is simply an error of how the random test is written.

  • Default User Avatar

    Didn't you have a "#include /cmath/" ('/' instead of '<' because it doesn't show up) in your code?
    Otherwise uncomment it in the "Example tests" if it is still commented.
    Edit: I just uncommented it.

  • Custom User Avatar

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

  • Default User Avatar

    the C++ version gives error in the example code:

    -isystem /runner/frameworks/cpp error: call to 'abs' is ambiguous
    bool inrange = std::abs(act - exp) <= 1e-6;
    ^~~~~~~~
    /usr/include/stdlib.h:775:12: note: candidate function
    extern int abs (int __x) __THROW attribute ((const)) __wur;
    ^
    /usr/include/c++/v1/cstdlib:159:44: note: candidate function
    inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
    ^
    /usr/include/c++/v1/cstdlib:161:44: note: candidate function
    inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
    ^
    1 error generated.

  • Default User Avatar

    Hi steffen,
    thank you for the answer. I think you're right but my suggestion is only to modify the description or the example tests to clarify more.

  • Default User Avatar

    The tests are right. Your code is wrong!

    From the description: "When an array in the array is null or empty, the method should return 0 too!"

    As you see in this random test, the first array is empty! So the correct answer would be: 0 and not 6

  • Custom User Avatar

    The basic and random tests in the full suite for PHP might have an issue. The result's always something similar to this:
    testBasicTests
    ✘ Failed asserting that 0 is identical to 1.
    Completed in 0.23ms
    testRandoms
    ✘ Wrong for [[],[39],[37,50,15],[49,36,16,17,14],[16,46,12,22,42,16,28,18],[44,18,15,13],[3,31,19,22,41,39,0],[28,37]]
    Failed asserting that 0 is identical to 6.

    Running the code separately actually returns the correct value - 6 for the random case (and whatever other random value the assertion returns). There must be an issue with how the execution's being done

  • Default User Avatar

    Congrats to 14k! :-)

  • Custom User Avatar

    There is nothing a word about, that the sizes starts from 1. This was only in your head. :-)

    All public examples start at 1, though.

  • Loading more items...