Ad
  • Default User Avatar

    n=0 is the very problem

    Thank's a lot :)

  • Default User Avatar

    It's hard to say, but looking at your code I'm guessing you are failing at the test case where n=0 which will lead to your tmp list being empty regardless of how you change indices.

    In general, to troubleshoot you should first try printing the test inputs - in Python just add:

    def zeros(n):
      print(n)
      rest of your code here
    

    where here n is the name of the input, to your code so that you can see in the console which inputs are causing you to fail.

  • Default User Avatar

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