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.
Check the instruction again, it's been updated.
You have to find a minimum value in each row and sum that and then return the sum from the function
A test result might look something like this:
Which can be copied and run locally.
If you get the correct result locally (here that is 318, but my code returns 319), then you might want to make sure your code compiles without warnings and make sure that you're not using any uninitialized memory. You might for example have an array that you do not initialize, maybe your compiler is zeroing that array and maybe that doesn't happen on codewars. That's behaviour that you should not rely on, if you want an array to be initialized with 0's then you better have code that initializes it with 0's.
(I'm assuming you're using C)
the very same test case fails on codewars but not locally?
I suppose you'd debug it on codewars instead of locally.
and/or get rid of non-standard stuff that only works locally
but if you're not running the same test case, then you don't know anything about it running perfectly since then you aren't running the test in question.
use the failing test input to debug your code
This comment is hidden because it contains spoiler information about the solution
You typically do want to stick to integer operations.
If you're in some way using decimals when you carry this out using pen and paper, then you're probably treating them as integers (maybe the unit is 0.25 instead of 1) or as strings (non-infinite series of digits), not float (an approximation).
Maybe you want to look at remainder after division, though not neccessarily. How do you do it with pen and paper? Try to stay true to that.
Rounding is suitable if you're measuring something, approximating something. This is exact. Rounding and approximating shouldn't be in your vocabulary.
Why?