Sort 12 Discussions, By:
Please Login in order to post a comment
Exactly why is the symbol N used to describe two different parameters in the questions.
For example in the beginning we ae told the definition of N as a number whose factors are equal to their sum.
In the actual question the number N is actually number of factors [2<=k<=N].
I have seen this discrepency in many of the questions in hackerrank. Someone is not properly proof reading the questions.
Is there any non-recursive approach out there? The recursive version loops through candidates in such a way that answers are updated occasionally (an answer you find midway might be replaced by another at the end of the day).
I tried to use a dequeue and set to generate multiplicative partitions (based on a list of primitive factors) of ascending n, and whenever any answer is found it is guaranteed to be one of the final answers. It seems to be correct but was too slow for half of the test cases. I don't know if it is because of the algorithm itself which is poor in nature, or the extensive use and manipulation of list and set in this case.
This is the difference between constructing products from ascending factors and constructing factors from ascending products. Well, after all the former approach sounds a lot more straightforward.
40 test cases ?! Seems to be a new record for Project Euler challenges.
I can see where you're coming from, but I was so happy when I got 5% after being bogged down in a couple of misconceptions.
I would like to ask why the importation of 12 when the answer is 61.
For k=7, Minimal Product sum is 14. Please clarify the problem.
I havent attempted this probem a of yet so I dont know how to go about this problem as of yet, but I can tell you that you that you are wrong for...for k=7, minimal product sum is 12, 12 = 1x1x1x1x2x3x3 and 12=1+1+1+1+2+3+3.
3x3x2 = 18.
In general, we recommend using the following resources to address any issues you might have.
- viewing successful submissions from the leaderboard. This can be very helpful
- messaging hackers whose code interests you
- editorial, if available
- any recommended references or tutorial embedded in the problem statement, if available
- viewing existing threads on forums.
- unfamiliar terms or concepts: Google is your friend :)
This may be a newbie question, but how can I find successful submissions from the leaderboard?
That only works for practice challenges, and even then you forfeit your score, if you look at other people's solutions before you successfully solve the problem.
Minimum product is 12: