Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
??? returning reference to stack variable ???
I have the same problem. Don't know hot to submit...
123.045.067.089 afaik is perfectly valid.
Really hard to understand the description...
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.
Guys passed the C kata as it was, not tricky:-)
Nevertheless I removed the comma. Please tell me if it fits you now.
Cheers!
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.
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.
This comment is hidden because it contains spoiler information about the solution
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.
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.
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
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
Congrats to 14k! :-)
All public examples start at 1, though.
Loading more items...