Ad
  • Custom User Avatar

    Hi,

    The example you give:-
    sort_by_perfsq([234, 61, 16, 441, 144, 728]) == [144, 441, 16, 61, 234, 728]

    number of perfect squares: 2 2 1 0 0 0

    suggests that a perfect square should only be counted once even if it comes from
    2 or more sources. Hence 16 is counts 1, but 61 counts 0. If this is the case what are the
    rules for counting or disregarding in such an example.
    Also 234 counts 0, 324 variation being ignored. It seems the instructions in this kata are not
    clear enough.

  • Custom User Avatar

    I have an issue with one of the tests:
    For (3, 4, 1001) my solution give 27 whereas your's says it should be 482.
    A quick python check of (3**19683)%1001 gives 27, so I don't know who is correct

  • Custom User Avatar

    Difficult for a 7 kyu. Succeeded on my 3rd algorithm, after previous efforts timed out.
    Without giving too much away I think the trick is to work backwards, starting at the answer.
    I expect the more challenging version of this will be impossible.

  • Custom User Avatar

    I think I've got as far as I can on this. I time out on the last test group. Still,
    I've come a long way and learnt a lot which is the main thing. My solution is python, more
    or less one-liner, I haven't enough maths to get the clever solution, and at 76, I'm passed
    learning it. Nice kata, and thanks. I'll come back to it I ever any more inspiration.

  • Custom User Avatar

    This is another kata I will have to give up on due to inconsistancy of codewars' test harness.
    The instructions state 'i' and 'j' should be treated as the same. However, sometimes the encryption
    comes back with 'I', sometimes with 'J', apparently randomly. I don't suppose anyone will reply to this,
    as is the norm when commenting on an old kata, so I'll move on, as it is impossible to arrive
    at a solution that will satisfy the test harness. At least it wa an interesting challenge.

  • Custom User Avatar

    In the given example, where does 'qr' at the end of the split pairs in step 4 come from?

  • Custom User Avatar

    Looking through the posts for this kata, it seems the grouping split is not adequately defined. I think therefore I will not make an attempt at it. I don't want to waste my time. Either it should be corrected, or removed.

  • Custom User Avatar

    Please ignore my previous post. I see that the test script had got corrupted.
    I can see what it should be.

    Chris

  • Custom User Avatar

    Your test harness gives an error on the last test:-

    File "/workspace/default/tests.py", line 8
    test.assert_equals(upsidedown('100000','123456789000000),718650)00'
    ^
    SyntaxError: '(' was never closed

  • Custom User Avatar

    Could you help me please?
    A few of my attempts are recorded as incorrect. In each case the first number in the range is 0 and the second is an upside downer.
    You say I am overcounting by 1.
    For example, in the case of 0,111 my solution gives a count of 9, whereas you say it should be 8.
    The numbers I am counting are [1, 0, 8, 88, 11, 96, 69, 111, 101]. I can't see whay the problem is. Are you including the last found, 111,
    as it is the end of the range?

    Chris

  • Custom User Avatar

    I find that my solution gives the following error message on Big Random Tests:-
    ValueError: Exceeds the limit (4300) for integer string conversion

    For example, this happens with n = 878173. When I test this on my computer it returns a value which has a length
    of 107246. I don't have a string conversion in my solution so must assume that it is something in your test harness.

    Chris

  • Custom User Avatar

    My Python solution times out on your servers. In my development environment, I find the 5000th green in 1 second. I find the average (2500 say) in 0.14 seconds.
    I don't know the nature of your test data, or how many tests you fire at my solution. Even though I have a print of the input in my solution, your server just
    gives me a time out message, nothing else of any use to assist me. Can you give me some more details about our test data for this kata please.

  • Custom User Avatar

    I'm sorry but there is nothing in this document that states codewars can sometimes give an incorrect answer.
    In this kata, the server seems to respond -1 to all inputs with a trailling zero such as 220, 440 etc.
    This smacks of arrogance to me. I've put a lot of work into my solution and to be told it fails is not acceptable. I don't need to
    do this, I'll find something else to occupy my time.

  • Custom User Avatar

    I have 10 "fails", including
    220 should equal -1 what's wrong with 202?
    440 should equal -1 what's wrong with 404?
    2 should equal -1 my solution correctly returns -1 in my own environment
    110 should equal -1 what's wrong with 101?
    987654321 should equal -1 what's wrong with 987654312 ?

    I won't bore you with the rest. Suffice it to say I don't think I have a problem with my solution.
    Perhaps you could look at your own.

  • Custom User Avatar

    When I came to train on this kata, there was a solution already in the workspace. Worked too!
    Thanks very much, but I doubt if it will get through the huge number tests.

  • Loading more items...