Ad
  • Custom User Avatar

    Your code does not consider person with 0 votes (i.e, not in the first element of each rows combined). They have the least votes and should be removed first, followed by those who have the least votes amongst the voted candidates.

  • Custom User Avatar

    because n starts from 1 not from 0 like your array

  • Custom User Avatar

    From what I can see it should pass a few tests. However there are test cases that will use very high int numbers for r. Including 1,000,000,000. So eventually your code would end up taking too long to run to pass all the tests, or cause names to get too large for memory. There is a mathmatical way to figure it out that will run quickly enough to pass all the tests.

  • Custom User Avatar

    You can format your code using markdown. Add ``` to the beginning and end of code.

    def code():
      return 1
    
  • Custom User Avatar

    Regarding the "Language undefined is not supported" message, I can elicit that response by pasting in a URL to a kata and trying to submit a solution prior to logging in and selecting a language.

    Make sure you've logged in to codewars and selected a language before trying to solve a kata.

  • Custom User Avatar

    Hi,

    The problem is at this part : del signature[1,2] there are never , in slicing notations, so you should use del signature[1:2] (I'm guessing you want to return only the first element). Note that your first seven statements could be reduce to 1 line, in python. ;)

    Enjoy python !

    PS : note that there might be some other errors too, I just indicated the notation problem.