Ad
  • Custom User Avatar

    Buggy solutions are able to pass (JS). Here are some random tests that my solution fails:

    At 685860,261047 - Expected: '0', instead got: '8'
    At 685860,261047,897868 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183,697514 - Expected: '0', instead got: '8'
    At 685860,261047,897868,685984,977072,603909,667425,163183,697514,15784 - Expected: '0', instead got: '8'
    

    Perhaps adding some fixed tests can seal this crack?

  • Custom User Avatar
  • Default User Avatar

    exponentiation is right-associative. 3 ** 3 ** 2 == 3 ** (3 ** 2) == 3 ** 9 == 19683

  • Custom User Avatar

    It's 3^(3^2) = 3^9 = 19683

  • Custom User Avatar

    I think this is just an issue with my code, but one of the python tests dosn't seem right. (version 3.10)

    Here's the log:

    List: [3, 3, 2]
    3 ** 3 == 27
    27 ** 2 == 729
    

    And here's the message:
    9 should equal 3

  • Custom User Avatar

    We don't consider this an issue. It's a trade-off for providing a more natural experience to the users.

    In fact, there are many ways to cheat the system because of the flexibility we provide and it's well known.

    We can prevent this specific case, but you can always find ways around it until we lock the system up enough to harm the user experience. So our policy is to only fix something that can accidentally cause the tests to pass and this one doesn't apply.

    Note that this "attack" only harms the "attacker" by ruining their learning opportunity. You'll learn more by solving a kata yourself.
    We also ban users who heavily cheats or plagiarizes because we don't want them in our community.

  • Custom User Avatar

    Bro, don't link straight to the kata edit page... :/ The kata will automatically be invalidated for anyone that clicks it and has enough privileges.

    If this hasn't yet been fixed, then you should probably reraise it as an issue instead.

  • Custom User Avatar

    Btw, avoid using global vars is mentioned in the Troubleshooting guide: https://docs.codewars.com/training/troubleshooting#works-but-no

  • Default User Avatar

    Ok, would avoid miss using the function next time,

  • Custom User Avatar

    Suggestion tag is used to improve the kata (like clarifying something, adding test cases, announcing a translation), not to avoid a problem with your code.

  • Default User Avatar

    suggestion to solve the kata in some languages(for me is C++ may need this suggestion)
    global variable should be avoided.

  • Default User Avatar

    7^6^5 and 7^6^1 are different

  • Default User Avatar

    for this problem, I have met it. Try not to use a global variable

  • Default User Avatar

    mind that 7^6^5 and 7^6^21 is different, see the pattern from 0 to 8 better than just 0-4

  • Default User Avatar

    suggest print the list content and current power index

  • Loading more items...