one test case failed https://ide.codingblocks.com/s/242374
Playing with divisor
hi @mohitmahi123, the problem in your code is at line 31
cout<<countdivisior(nod/2,n);
since nod represent no of divisor %mod
nod/2 is not same as (no of divisors/2)%mod
if you want to compute (no of divisors/2)%mod then you have to multiply nod with inverse modulo of 2 and then take mod
i.e
(nod*500000004)%mod , where 5000000004 is inverse modulo of 2 wrt mod
corrected code
In case of any doubt feel free to ask 
mark your doubt as resolved if you got the answer
1 Like