What is fault in my code

code: https://ide.codingblocks.com/s/207800

@spagire4 while calculating the function your program would already give it so you need not use that.
Try to solve this question by using the formula to calculate number of divisors of a number by using the power of its primes and then extending it further to apply it on P.
The product of all the divisors of a number N is N^x where x is the number of divisors of N. The number of divisors is given by product of prime powers+1 for N. for example if N = 12 than its number of divisors are (2+1)*(1+1) = 6. you are already given the prime powers of N hence its number of divisors can be calculated.

@amankumarkeshu sir i did as u pointed out but same problem: https://ide.codingblocks.com/s/208094

I’m sing that use AC with such a huge number your solution might get a tle over there only

sir can u pl provide its solution its editorial not present

@spagire4 We are not allowed to get very students directly the solution. We can only give hints and approach to the solution. Still it might help.

For each prime in input array do the following : tmp[ i ] = (val*(val+1))/2 * factors( i )
where val = inp[ i ]
factors( i ) is a function which calculates product of inp[ i ] + for all indexes other than i
Finally take product ( tmp[ i ] + 1 ) for i = 1 to n

@spagire4 https://www.hackerearth.com/problem/algorithm/number-of-divisors-3-4f073391/editorial/
This is the editorial. If I have resolved your don’t please close this doubt.