Ad
  • Custom User Avatar

    OP solved it, closing...

  • Custom User Avatar

    Same here - I ran it in Visual Studio and got 5.

  • Custom User Avatar

    this is not a suggestion ... ?

  • Custom User Avatar

    It's difficult to tell why your code is wrong without seeing it. My crystal ball got broken, sorry. Nonetheless, your code would pass the tests if it were correct, and if it does not pass, it menas it's not correct. The fact that it works for you locally is a good sign, but still not enough.

  • Custom User Avatar

    Well, I'm not gonna give you the solution... I told you where to look at (spoiler: I fixed it and solved it with your code). There are random tests with random arrays so it's likely that you're not using the same inputs.

    And by the way, there is a thread open already, so you should reply to it, not spam the whole thread with more posts. But if you're just gonna keep downvoting people trying to help you, well... good luck on your own.

  • Custom User Avatar

    The Question is how can the code has mistakes when it runs correctly in Qt with the same array as input as in example.

  • Custom User Avatar

    How can we know if the problem can be fixed if you don't know what you're doing?

  • Custom User Avatar

    Because you didn´t replay anything that could solve the problem

  • Custom User Avatar

    @TheCoder99: Are you actually trolling? You keep posting questions and issues, which I answered and you just keep posting new ones without looking at the replies.

  • Custom User Avatar

    Just checked the C++ version, it seems to be OK. You probably have some mistake in your solution.

  • Custom User Avatar

    Hi everyone. When I run the code in my IDE(Qt) it shows the correct output, but when I run the code here, I get different output. Does someone encountered similar problem?

  • Custom User Avatar

    I am unable to se the example input & outputs

  • Custom User Avatar

    First, get rid of those define clauses. Secondly, you wrote function signatures, but you didn't implement them. That's all that's missing.

  • Custom User Avatar

    Off-topic??? Use that kata's discourse section to post such questions.

  • Custom User Avatar

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

  • Loading more items...