6 kyu

Find the First Number in Having a Certain Number of Divisors I

322 of 936raulbc777
Description
Loading description...
Fundamentals
Mathematics
Data Structures
Dynamic Programming
Memoization
View
AllIssues8QuestionsSuggestions5Show Resolved
  • Please sign in or sign up to leave a comment.
  • JohanWiltink Avatar

    ( JS )

    Random tests don't run because of nested its.

    ETA: translation doesn't abide by numDiv < 80 either.

  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • webhsir Avatar

    i know, because has number 10, min number is 48

  • webhsir Avatar

    who can tell me
    find_min_num(10) = 48 # divisors are: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48

    10 => divisors are: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48 this means?

  • webhsir Avatar

    why 10 divisors are: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48

  • vlyrki Avatar

    "There will be a next kata with numDiv < 10000" numDiv=9999 and the decision will, by all appearances, be = 91695537858773979462999063778453094400 BigInt (for JavaScript, for example) allowed?

  • u2fan Avatar

    D language

    source/solution_test.d(3,8): Error: module solution import add not found /usr/bin/dmd failed with exit code 1.

  • adbiLenLa Avatar

    #11b34/3qa:0z:vV

    this kata was challenging

  • akar-0 Avatar
  • akar-0 Avatar
  • ejini战神 Avatar
    • JS Node 14. should be enabled

    • Python new test framework should be used

    • Ruby 3.0 should be enabled

  • ejini战神 Avatar

    Dynamic programming tag should be removed

  • ejini战神 Avatar

    Description should be language-agnostic

  • abyf Avatar

    My algorithm passed all test till a cetain number (for i:1 to n<8000), but failed when n>=10000 due to algorithm time execution (o=(10000)). I need a better data structure to handle this in a shorter time. Refactoring to reduce an algorithm complexity is not my favorite.

  • akar-0 Avatar
  • Voile Avatar

    Also, there are problems with the random test cases:

    1. description says numDiv < 80 but random test cases go up to 100.
    2. For some numDiv the corresponding is really huge, which is impossible to calculate on the fly without timeing out; in fact, even the random test cases don't touch those values. It's very misleading to just say numDiv < 80 (or 100) when some of the possible values are practically untouchable and hence not considered.
  • Voile Avatar

    This comment has been hidden.

  • wing_clover Avatar

    I passed all tests but this one: 120 should equal 4096. But doesn't 4096 only have 13 divisors? Also the question details specify that numDiv < 100, why would 120 be in the test?

  • Saeif_Saleh Avatar

    I get this error

    test(MinNbDivTest) Fixed Tests Test Passed test1(MinNbDivTest) Random Tests Process was terminated. It took longer than 10000ms to complete Any idea how to solve it?

  • UrNotSorry Avatar

    Since the question details specify that numDiv < 100, there needs to be a test case of where numDiv = 97. All of current solutions will time out (including mine), at least for Ruby.

  • mbr84 Avatar

    This comment has been hidden.

  • pickwik Avatar

    I wrote method, what returns first int value, what have assigned count of divisions(Is this correct task?) but your tests does something wrong - for example: on the row MinNbDiv.findMinNum(7) test returns "expected:<64> but was:<24>" we can count it now: 24 divisions are: 1,2,3,4,6,8,12,24 - 8 (8>7 so it must be correct answer) there is more issues like this, cause if I'll add this to my code: "if(num == 7)return 64;" to escape this error, i'll get some more from random test(for example "expected:<3600> but was:<2520>") I think there are some errors in this kata tests;

  • 屌丝万岁 Avatar

    牛逼,牛逼!

  • bkaes Avatar

    Haskell version doesn't follow Haskell conventions: find_min_num should be findMinNum.