Ad
  • Custom User Avatar

    I reduced the upper limit of the tests in python, it's now fixed.

  • Custom User Avatar

    Hi,
    Thanks for your answer, as it helps me to point where I misunderstood the instructions.

    In my initial code, I was first sorting the player by winning number, taking the nth winning number, and in case of two players with the drawn winning number, then only I sorted them alphabetically and take the first one.
    So:

    1. Sort by winning number
    2. choose the nth winning number
    3. Sort surname alphabetically in case of equality.

    But this is wrong. According to your answer, I've understood the correct order is:

    1. Sort by winning number
    2. In case of equlity between two players, sort them alphabetically
    3. Draw the nth player in the sorted list.

    I've update my program and now all tests are running fine. Thanks :-)

  • Custom User Avatar

    Hi,

    I'm having the same issue as @jkapler.

    On the same test, my code is returning Elizabeth as it has the same winning number as Matthew, and rank 2 corresponds to their winning number. Sorting alphabetically the firstnames gives Elizabeth as ultimate winner.

    What did I understand wrongly in the instructions?

  • Default User Avatar

    Thanks! Ya it's interesting to see the many ways it can be solved.

  • Custom User Avatar

    Also in python?

    Trying it again gives still bad results:

    '8,855,670,992,098.963' should equal '8.8,556,709,921e+12'
    
  • Custom User Avatar

    I have updated the test cases.

  • Custom User Avatar

    I didn't realise that was possible on the test cases. I have altered now. Thanks for the feedback!

  • Custom User Avatar

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

  • Custom User Avatar

    Good kata. The great thing is that it can be solved with many different code, for simplest to smartest. Thanks.