[Community Puzzle] Divide the factorial

I sent a mail to coders@codingame.com, with two other cases you can use in validators.
It was a week ago.

Also what about wrong solutions already posted?

I wonder if cases with divisors like 12, 80, or 135 are feasible.

Oh yeah, add case 135 10 -> 1. This should be fun.

I guess a few test cases were added to this (nice), but I’m afraid I’m still floundering for a complete answer. I pass all but Validator 4 after I submit this problem. Does anyone know any clever edge cases I can test? I seem to already have been passing all the test cases currently in this thread.

I just noticed the validator 4 case is supposed to be large, and my factorization is slow. I’ll check if that’s my problem :smiley:

I have implemented a known good formula, and a formula for smaller numbers. I can get everything to give me the right answer but validation case 7. I have no idea why 7 won’t pass, It’s not a speed thing, as I don’t factorize any very large numbers, but use a different formula.
I have no idea why it won’t pass. Maybe I found the wrong formula to utilize.
Disregard above, I was using the common method found online, and it’s flawed somehow, i’m not sure.
The only way I figured it out was looking for the actual math required, and truly applying it.
Like others have mentioned, it involves prime factors and their powers