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?
Number of Divisors
@sm26175
your code is correct but there are two mistakes in your code
- line 48 should be factors[x]+=coun;
- 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