Challenges - Number Theory , Question : Playing with divisors is fun

Code link : https://ide.codingblocks.com/s/432252

In the code I am trying to find total power for each of prime that would come from different combinations (factors of number).

Formula that I am using is :

iTH_prime’pow = ((prod/arr[i])%m * (arr[i]*(arr[i]+1)/2)%mod)%mod

prod is product of all powers present in array.

Can you tell me the mistake?

Hello @deep4013 please wait let me check your code:

@deep4013 i think your approach is not fine have you seen the editorial for this?
there must be the editorial in your course.
check this:

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.