Ad
  • Default User Avatar

    when i test code in this platform it doesn't work the same as IDLE
    on idle the same code shows correct answer

  • Custom User Avatar

    В целом задача простая главное не забыть вернуться в нужную точку:)

  • Default User Avatar

    Does this sequence of directions lead you to the same position (starting point)? ;)

  • Default User Avatar

    Can anyone help me with this test: ['n','n','n','s','n','s','n','s','n','s'] ?
    this test in condition true because of len is 10 and it is in 'nswe'
    but test requires False for this test ?
    but this test before calling has 'not'
    but 'not' doesnt work

  • Custom User Avatar

    is it due to a loop that's causing the O(n^2) ?
    do i have to make it O(n) ?

  • Custom User Avatar

    You don't have to worry about the size of the input (don't need to test if the length of the list is less than 1M).

    The problem is that your solution takes a time that is proportional to the length of the list squared. It means that if the input is 3 times as big, your solution will run 9 (3x3) times longer. The goal of this kata is to find a way to code a solution that takes a time proportional to the length of the argument.

    With big words, your solution currently runs in O(n^2) and you have to make it run in O(n).

  • Default User Avatar

    Таже проблема. В этом то и сложность этого кода.
    Нужно максимально его оптимизировать чтоб блина списка в 10**6 могла быстро решится.
    Сам думаю над решением ;)

  • Default User Avatar

    Could you help me with a hint,
    i can't pass 'Big size' condition in Attempt
    i write code for this condition 'size of S goes up to 10^6'
    lenght has to be less then 10^6 but unfortunately it doesnt work
    i dont know how to solve this problem

  • Custom User Avatar

    I resolved the problem...the count of 44 was a error.

  • 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.

  • Custom User Avatar

    Hello people!!

    In basic tests it says: "561 should equal 362"

    shouldn't it be equal to 44? For me, the result is 44 and i test in other progran

    Thanks

  • Custom User Avatar

    Your solution has a quite subtle bug.
    Your code is wrong, and kata seems to be OK.

  • Default User Avatar

    561 should equal 362

    everything corrects except, these tests.

    i've open solution and all solutions dont work with this test... please, fix it

    The same problem, yesterday i thought the problem was in my code, today i gave up and saw solution almost the same and tried use solution code to see what the differnce would be, but anyway again the same error showed:
    ''561 should equal 362''
    really guys i dont understand anything, why it shows this error

  • Custom User Avatar

    This means your function returned 561 but the correct answer was 362, for some number (in this case 73567465519280238573). Your code failed on other inputs, it is incorrect.

  • Default User Avatar

    it's mistake in problem. they must to fix it

  • Loading more items...