Retired

Find number with most divisors (retired)

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • FArekkusu Avatar

    The order of returned values is not specified.

  • anter69 Avatar

    Multiple issues:

  • vlyrki Avatar

    I have understood. It has turned out that there was simply "not enough" list of prime numbers. At increase in the list to 173 (would be possible less) the mistake was gone.

  • vlyrki Avatar

    Somebody can explain how to understand a mistake: [2492, 1988] should equal [2492, 1988, 8253] in ATTEMPT?

    "RUN SAMPLE TESTS" passes without mistakes. 4 tests pass in "ATTEMPT". The fifth gives a mistake: "[2492, 1988] should equal [2492, 1988, 8253]" My code for all numbers - 2492, 1988, 8253 - gives identical number of dividers - 12. And findNumberWithMostDivisors ([2492, 1988]) gives out [2492, 1988], and findNumberWithMostDivisors([2492, 1988, 8253]) - [2492, 1988, 8253]. What has to be equal to what in [2492, 1988] should equal [2492, 1988, 8253]

  • daddepledge Avatar

    For python you shouldn't have CamelCaseFunctionNames. I didn't need the list of primes and solved it using simple brute force. If you want to force a better approach I think you need test with longer lists of numbers. I enjoyed it nevertheless.

    • dongwoogjeong Avatar

      Sorry. As this was my first kata, it was not streamlined. I thought a list of primes would help,... but fortget about it. Thanks.

  • __TomFoolery__ Avatar

    dont know that the deal is but this is annoying the hell out of me im gonna leave it and come back later

  • snormandeau Avatar

    This is an error on this test.case: test.assert_equals(findNumberWithMostDivisors([100,150,18,96]), [96])the answer is not [96], it is [96, 150]. But when submitting, it pass.

  • raulbc777 Avatar

    This comment has been hidden.

  • smile67 Avatar

    Your second static test is wrong:

    test.assert_equals(findNumberWithMostDivisors([100,150,18,96]), [96])
    

    Solution is [96,150], both have 12 (or my code is wrong, but works for submit:-));-)!