Question: Factoring n = 10 we get {1,2,5,10}. we then return the p = 3rd factor as our answer. Sample input 10 3 Sample output 5
Factoring n = 10 we get {1,2,5,10}. we then return the p = 3rd factor as our answer.
Sample input
10 3
Sample output
5
Constraints
1 <= n <= 10^15 1 <= p <= 10^9
use Javascript Code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
