Ad
  • Custom User Avatar

    Duplicate issue below

  • Default User Avatar

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

  • Default User Avatar

    Thanks for this information!
    I did agaain the kata and have a valid solution now, but the "cheating" one is still displayed as a valid one.

    Is there a way to delete it?

  • Custom User Avatar

    It seems that you have accidentally used what is known as the "early exit cheat" - the script terminates prematurely after passing one or more assertions but before the full test suite is executed so Codewars mistakenly thinks that you have passed all tests in the Kata.

    Such cheats are well-known by the maintainers of Codewars but Codewars does not try to prevent all such possible cheating solutions from passing. Instead, once such cheats are discovered, the honor and rank progress "earned" by said cheater will be revoked, possibly along with an additional penalty. Repeat offenders may find themselves permanently banned from the site, i.e. having their rank set to 8 kyu and honor set to 0 with no way of editing profile information or deleting the offending account.

    Please refrain from submitting (or even trying out) cheating solutions in the future. In general, you should never use any function that attempts to terminate execution prematurely (such as exit()) in any Kata, nor should you attempt to interfere with any testing framework(s) being used.

  • Default User Avatar

    My non valid php solution was accepted while making some tests about the code lenght.
    I don't know how it's possible, as the script simply die and return the input on one validating case.

    Is there a way to report this?