i am not able to think of a logic
Plz tell me a proper logic for this question
Hey @alter
Hint :
- Make the number
Pusing numberNin form of an array. - Use PnC to find number of divisors of
P.
Example :
- Say
N = 30
2 3 5
1 1 1 - Now
P = 1 * 2 * ....... * 30 = 810000
You need to understand that divisors ofNare combinations of2, 3 & 5.
To make the array ofP. You need to count the number of times2, 3 & 5will be picked in the divisors ofN.
As all the numbers are there only1time. there are8combinations of2, 3 & 5(000 001 010 011 100 101 110 111)where0means not picked and1means picked. We can see there are8divisors of30.
Using this we can make the array forP.
P = 810000
2 3 5
4 4 4
Now finding the number of divisors ofPis easy.
000 001 002 003 004 010 011 012 013 014 ........... 442 443 444these will be all the divisors ofPwherexyzmeans picking x of2,yof3andzof5.
You can clearly see this is just abase 5counting with3bits. so there will be5^3numbers b/w000 .... 444which is125.
I hope this helps you.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.