This is the inverse of the problem Exponents in Factorials. Instead of being given a number and finding out the highest exponent it can be raised to for a given factorial, you'll be given a power, and you're being asked to find the highest number that can be raised to that power for a given factorial.
For example, n=7 and p=2. The highest perfect square (p=2) that can evenly divide 5040 (n=7, and 7!=5040) is 144, or 12^2. Therefore, your output should be y=12.
As before, you can assume that both n and power are integers greater than 1.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers26
Suggested Problems
-
Given two arrays, find the maximum overlap
1728 Solvers
-
23771 Solvers
-
238 Solvers
-
How long is the longest prime diagonal?
410 Solvers
-
The Answer to Life, the Universe, and Everything
578 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!