Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
.
This comment is hidden because it contains spoiler information about the solution
got it! Seriously thanks for your immense help! I have a hard time imagining
how I would have seen that without your help!
You say you think it contains some specific information. Do you have any promise anywhere that tells you this is so? Or any indication at all? If you look at the example code you can see how it is used. It does not put this length information there, or any other information, but the parameter is used, what's done with it?
Not required to answer that, but so that you have the full code - this is the preloaded function:
(and if anyone's feeling trigger happy on the spoiler button - don't. there is nothing secret in this.)
As far as I can tell its the amount of pairs in the answer which is why I allocate the Pair** with that amount so the array of structs is that length.
Reconsider what the
length
param is for. What promises are you given about it, how is it used in the test code?find a faster way to find divisors (maybe googling turns something up)
you can also try finding divisors for some numbers manually, humans are optimizing problem solvers so you might .. optimize it and then do the same thing in your code
This comment is hidden because it contains spoiler information about the solution
No, you still didn't understand me. You have to solve this WITHOUT calulcating factorial. Try running factorial_func(4000) and see how long it takes (spoiler: too long).
I solved it long time ago, so I don't remember how, but I see I never calculated any factorials. This is more of a math problem.
Also, when you post code, use it with proper formatting, otherwise we can't debug it with all indentation errors.
This comment is hidden because it contains spoiler information about the solution
I don't know exactly where it's wrong, but I see that prime list doesn't contain 2, that's one of your problems (looks like incorrect ranges specified), but it's your task to debug it, not mine.
Also, it looks like you're actually calculating the factorial itself. That's way too slow and not gonna work for bigger numbers. There's another way to solve it.
This comment is hidden because it contains spoiler information about the solution
Why divide by 12? Why divide 12 by 2? Where are these calculations coming from?
12 factorial is BIG number, that's why you can keep dividing it by 2 10 times, until it's not possible anymore. I don't think you quite understood this task...
Hi!
There is something that i dont understand. For example, factorial of 12 why is divisible by 2 10 times??!!?? i try to solving calculating the factorial of 12 and dividing by 12 but the result is really big, and dividing 12 by 2 is 6...
Could someone help me?
Thanks in advance!
"since 12! is divisible by 2 ten times, by 3 five times, by 5 two times and by 7 and 11 only once.""
Loading more items...