Didn't you forget 30, 40 and 60 as divisors of 120 there? 120 has 16 divisors, not 13. In "120 should equal 4096" error message for find_min_num(13), the first value is what the user's function wrongly returned and the expected one was the other one, 4096. About 120 is a divisor of 4096, that's why is in the list. I don't know what he meant there, but it's wrong.
Hi, I am new here and have the same problem when trying to solve this kata in Python as wing_clover had.
If the argument num_div is 13, then the first number with 13 divisors is 120: 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 120.
It is true that 4096 has 13 divisors (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096) but it is not the smallest number with 13 divisors.
I also don't understand raulbc777's statement '120 is divisor of 4096' which is obviously not true.
Hi wing_clover. In this kata you have to create a kata that outputs the minimum number that has a certain quantity of divisors numDiv(this is the argument that the function receives). In other words, if you start your search from n = 1, you should output the first number in having this amount of divisors.
In the given case, if numDiv = 13, the function outputs 4096. That means what I've explained you the line above. There is no number, (starting fron n = 1) that has this exact quantity of divisors. Of course that there are numbers less than 4096 that have more divisors than 13. 120 is a divisor of 4096, that's why is in the list. What the kata says is that the argument numDiv < 100 for the random tests.
I hope that the explanation will help you to solve the kata. Until now, 115 codewarriors have solved it.
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?
Didn't you forget 30, 40 and 60 as divisors of 120 there? 120 has 16 divisors, not 13. In "120 should equal 4096" error message for
find_min_num(13)
, the first value is what the user's function wrongly returned and the expected one was the other one, 4096. About120 is a divisor of 4096, that's why is in the list.
I don't know what he meant there, but it's wrong.Hi, I am new here and have the same problem when trying to solve this kata in Python as wing_clover had.
If the argument num_div is 13, then the first number with 13 divisors is 120: 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 120.
It is true that 4096 has 13 divisors (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096) but it is not the smallest number with 13 divisors.
I also don't understand raulbc777's statement '120 is divisor of 4096' which is obviously not true.
Thank you very much for the reply. It was my bad. I thought the test was telling me if numDiv = 120, the function outputs 4096.
Hi wing_clover. In this kata you have to create a kata that outputs the minimum number that has a certain quantity of divisors
numDiv
(this is the argument that the function receives). In other words, if you start your search from n = 1, you should output the first number in having this amount of divisors.In the given case, if
numDiv = 13
, the function outputs4096
. That means what I've explained you the line above. There is no number, (starting fron n = 1) that has this exact quantity of divisors. Of course that there are numbers less than4096
that have more divisors than13
.120
is a divisor of4096
, that's why is in the list. What the kata says is that the argumentnumDiv < 100
for the random tests.I hope that the explanation will help you to solve the kata. Until now,
115
codewarriors have solved it.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?