Ad
  • Custom User Avatar

    Mh, I fear it is against the rules to give away the code that works "under the hood"; you can have a better luck printing the initial parameters and some intermediate steps until you get where the error is; remember that the sample tests you see are just a (small, usually) part of the whole course, so you may consider some edge test case.

    I would go for a much simpler solution than yours, but that may be just me.

    Also, when posting code, be sure to use the spoiler flag, so not to let others who did not complete it see your works [I flagged it for you now].

    Hope this helps, happy coding :)