please i cannot able to solve it
any help would be appreciated.
Playing With Divisors Is Fun
Hint :
- Make the number
P
using numberN
in 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 ofN
are combinations of2, 3 & 5
.
To make the array ofP
. You need to count the number of times2, 3 & 5
will be picked in the divisors ofN
.
As all the numbers are there only1
time. there are8
combinations of2, 3 & 5
(000 001 010 011 100 101 110 111)
where0
means not picked and1
means picked. We can see there are8
divisors of30
.
Using this we can make the array forP
.
P = 810000
2 3 5
4 4 4
Now finding the number of divisors ofP
is easy.
000 001 002 003 004 010 011 012 013 014 ........... 442 443 444
these will be all the divisors ofP
wherexyz
means picking x of2
,y
of3
andz
of5
.
You can clearly see this is just abase 5
counting with3
bits. so there will be5^3
numbers b/w000 .... 444
which is125
.
I hope this helps you.
how to find x,y,zā¦ please explain. I mean the powers of prime numbers in P.
using combinations of current divisors. See in these 8 combinations the is ā1ā at each possition 4 times.
Thanx , Rated you 5 star.
1 Like