Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I agree with everything hobovsky said. This solution happened to pass because of an implementation detail of the tests, but I just made them a bit stricter, and the solution should now be rejected.

    I don't see this solution in the list of solutions though. Neither in the passing nor in the invalidated ones. What's going on? Did you actually submit it? Or maybe some Codewars worker queue simply hasn't caught up yet?

  • Custom User Avatar

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

  • Custom User Avatar

    But here you should be careful. Because '/' is integer division.
    So (a / 2) * 3 is not same as (a * (3 / 2)) i.g. a == 1
    My gut tells me that this additional feature will be implemented through many crutches :)

  • Custom User Avatar

    That's the question I got from a company's coding assessment, I agree, there is some information doesn't clarified, and I try what you said in my code and try that test again , but stll left 3 test cases couldn't pass, unfortunately, all the weighted test cases are hiden.