Playing wih divisor is fun

Could you please elaborate more on the approach and math behind it, i know how to calculate the number of divisor by using prime factorization but i’m not getting what they have done over here

Hey
Yu will be given a number N. Lets suppose N is 30. The prime factorization of 30 is 2x3x5
So the array A will be of size 3 and its elements will be {1,1,1}. This means that A[i] is the power of ith prime in the prime factorization. If the prime factorization had been 2x2x3x3x3x3x5 the array would had been {2,4,1}.Now for N=30, the product of its divisors would be 1x30x2x15x3x10x5x6 which is equal to P. Now the question asks to find the number of divisors of P.
Basically this is just an extension of number of divisors of a number where you have to calculate the number first ( P ) using array A.

Agreed on your point it’s clear ki we have to get number of divisor of p, just explain me the editorial provided by you, i’m not getting why they took mod inverse and all i hope for an positive and immediate response

Mod inverse? I have not mentioned mod inverse anywhere. You can call me on 7838702561 so that I can communicate fully

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.