How the product of all divisors is n^(x)?

I was solving the problem of “Playing with Divisors is Fun”.

In the solution, it is given that, the product of all divisors of n is n^(x) where x = no. of divisors.

But, if n = 30, x = 8. In this example, the product of divisors is 30^4 = 810000 and not 30^(8).

I am not able to understand this concept.

It’s written incorrectly , its actually n^(x/2).
In the code it is considered to be x/2, see this line

vec[i] = (vec[i]*500000004)%p; // 500000004 is mod_inv(2,1000000007);

It is multiplied by multiplicative inverse of 2.

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.