Ad
  • Custom User Avatar

    Why are you taking the sign after mod? Mod shouldn't change sign or am I crazy?

  • Custom User Avatar

    To reiterate the last few comments, although now with the added issue tag.

    I have written code that past the tests, when it went off to the test suite, it came back with an error and 0 Passed, 0 Failed. The code was converted into JS and that code was able to pass the JS testing. The code was turned back into C++ from JS and the code failed again, with the same problem.

  • Custom User Avatar

    I couldn't help but try and do this, sorry to anyone who has to scroll past this...

  • Custom User Avatar

    I've just ran successful JS code by taking the C++ code and turning it into JS by hand, and it worked without a hitch, then to double check I turned my JS code back into C++ code and it still gave the same issue with Passed: 0, Failed: 0.

    The C++ version of this Kata must be bugged some how.

  • Custom User Avatar

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

  • Custom User Avatar

    So my C++ code works perfectly on all the test cases and I'm completely certian that it works, for some reason though when I submit the solution code wars gives me an "undefined error".

    I'm haven't the faintest idea on how to make it work, but I'll post the code bellow.

  • Custom User Avatar

    There would be no way to determine that a operator was unary in the postfix notation, so it wouldn't make sense to allow for them unless you remove all the unary + and turn -x into 0x-.

  • Custom User Avatar

    I actually wrote it out using sumation notation and then simplified down.