Ad
  • Custom User Avatar

    You're mutating the input too.

  • Custom User Avatar

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

  • Custom User Avatar

    meet[boss] = meet[boss]*2

    That's mutation of the input. Unfortunately for you, the tests aren't written in the best way and the expected solution is computed with the same dict instance that you used, but AFTER your solution has been run. So, ofc, it computes a result that is matching the data that are in the dict after you changed it. Meaning that the tests are "correct" and the problem effectively comes from your solution.

    => mutation of the input is very bad practice. Don't do that unless it's clearly specified that you can do it.

    And when someone tells you that you're doing wrong, ask yourself if that person couldn't be telling you the actual thruth before jumping on the downvote button...

  • Custom User Avatar
    1. what's your code? (spoiler flag)
    2. did you actually read what I wrote?
    3. I didn't say that your answer to that question was wrong, the problem is in your code, not in the way you do the maths.
    4. And you should bet that the problem is in your code and not in the tests, when there already are more than 150 users who completed the task in your language. That or you have to proove that the problem is in the tests and not in your code. What you're absolutely not doing currently.
  • Custom User Avatar

    don't mutate the input (that or you forgot something. But tests are "correct")