Ad
  • Custom User Avatar

    Never mind, the anti-cheat engine let me know it wasn't allowed

  • Custom User Avatar

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

  • Custom User Avatar

    Don't worry! I agree that it can be inferred from the code, it really is just a small issue, not really kata-breaking or anything. But hey, it's a pretty trivial fix and no reason not to have it correct. I'd change it myself if I had permissions/knew how. Thanks!

  • Default User Avatar

    Maybe I didn't understand well your first post and I answered wrongly but you could have seen in the description for C this line:

    `I = {12, 15}; // result = "(2 12)(3 27)(5 15)"

    and in initial solution:

    char* sumOfDivided(int* lst, int l) {
      // your code
    }
    

    which shows that the return is a char *.
    In the description I will replace the line:

    The final result has to be given as a string in Java, C#, C++ and as an array of arrays in other languages.

    by
    "The final result has to be given as a string in Java, C#, C, C++ and as an array of arrays in other languages".

    since in that line I forgot "C". I am sorry and thanks for your post.

  • Custom User Avatar

    Reopening a previous issue, with some clarification.

    The kata's description is imcorrectly worded for C. It implies you need to return an array of arrays, however it asks for a string in the test cases.

    The function returns a string, and the tests expect a string. There is no conversion whatsoever in the tests. There is also no such thing as a Data * type in the C version of the kata. The test can be passed in C, however the description is incorrect and it could mislead users into returning the wrong thing.

    Either the description should be corrected, or the test cases should be changed. The former makes more sense, in my opinion.

  • Custom User Avatar

    What you're telling me is completely incongruent with what the actual kata and the tests say. The function returns a string, and the tests do expect a string. There is no conversion whatsoever in the tests. The test can be passed, indeed I have completed it. I am flagging the poorly worded description that describes the kata incorrectly.

    The kata is doable, sure, but the description is incorrect. Also, in the C solutions, you can see that everyone returns a string. It cannot be completed otherwise.

    I'm reopening the issue.

  • Default User Avatar

    I am afraid you didn't understand well the tests. You have to return a Data * but to ease the testing your return is transformed by the tests in a string. This transformation has not to be done by yourself, it is made by the kata. Note at the top of the age that 47 guys passed the C kata.

  • Custom User Avatar

    The kata's description is imcorrectly worded for C. It implies you need to return an array of arrays, however it asks for a string in the test cases.

  • Custom User Avatar

    Upon returning to this kata, I've found out why it acts strangely in C. Sometimes, during random testing, there will be a comma at the end of the list of participants, which, if you're counting participants using the delimiting character, will make the program crash. I think it is pretty ridiculous to have to account for this, when the kata does not specify anything regarding empty elements in the list. Additionally, since the sample tests do not have any cases like this one, it makes it kind of cryptic to decipher the issue. It would be nice if this could be revised. Thanks.

  • Custom User Avatar

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

  • Custom User Avatar

    Goodness, the units in this kata are an absolute mess. It's hard to understand if you're trying to make calculations that make sense and not just following the formulas "as-is". I've taken the freedom to use proper units in my solution. It was a bit of a pain, but everything makes a lot more sense and it's significantly less convoluted.

    The kata is good, but it would be a lot less frustrating and much more fun if the problem was properly set.

  • Custom User Avatar

    I am unable to complete this kata in C. My program runs all the sample tests, as well as any tests I run myself outside of this. However, during random testing, it gets through (on average) 30 tests before one just segfaults the program and fails. It gives me absolutely no way to fix the issue, as I cannot reproduce it locally and it doesn't tell me what input it tried using that crashed the program. It doesn't seem to follow any pattern, it just will sometimes get tripped up and crash. I cannot complete the kata.