Ad
  • Custom User Avatar

    yeah, been having issues all day https://status.codewars.com/

  • Custom User Avatar

    Use this: print(f'"{n}"')

  • Custom User Avatar

    Look where the closing quote is.

  • Default User Avatar

    In Python the error message: X should equal Y means that your code is returning the value X, and the correct answer (expected by the kata) is in fact Y.

    If you put print(n) at the start of your code (before cuenta = 1 for example) you will see that the test you are failing is for the input value of n = 73567465519280238573. Your code is producing the answer 561 for this input, and the correct answer is in fact 362.

    I have no idea where you get 44 from, since not even your current solution is producing 44 so your "test in other program" is very strange.

    I will give you a small hint for where you are going wrong - add another print(n) line just after your code n = n/2 and see if you notice something about the numbers that your code is working with.