Ad
  • 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

  • Default User Avatar

    I don't want to raise an issue before actually found it bug but...
    in C++
    I found that the input may not behave as an int list,
    as I tried to use a recursion way (pop_back every recurring round, stop at size=0) to solve and print the array size every round, found that the initial size for some case is 0 then will be 2,after going to 0 it will go to other size and decrease to be 0 again, I guess this is which indicated it's a list with list of int?
    {{},{a,b},{c...},...}
    instead of {a,b,...}
    while in python, I didn't observe this problem and have solved the kata

  • Custom User Avatar

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

  • Custom User Avatar

    This kata is voulnerable to file read attack, you can simply require fs in node and then read the index file and have the kata solved for you.
    I noticed cause when I'm stuck I just console.log this which shows index file is cached and fs is active.

    const fs = require('fs');
    
    fs.readFile('/home/codewarrior/index.js', 'utf8', (err, data) => {
      if (err) {
        console.error(err);
        return;
      }
      console.log(data);
    });
    
  • Custom User Avatar

    When you get paid per line of code.

  • Custom User Avatar

    When your income depends on Line of Code.