Number of Divisors

Hi! This is the code for Number of Divisors. But it is giving me 1 correct and 2 wrong for 2 test cases. Please tell me what’s wrong with the code?

@sm26175
your code is correct but there are two mistakes in your code

  1. line 48 should be factors[x]+=coun;
  2. In question it’s mentioned that ans could be large so print ans%1000000007; So add sum%=1000000007; after line 62.

@sm26175
Here is the updated code :https://ide.codingblocks.com/s/292866
works fine for all testcase

@sm26175
i think you got the 100 point. Please mark this doubt as resolved.