https://ide.codingblocks.com/s/478885 --> Problem ???
10 or 20 ke liye sum sahi aa raha h but 100 ke liye nahi.
Esa kyu ??
https://ide.codingblocks.com/s/478885 --> Problem ???
10 or 20 ke liye sum sahi aa raha h but 100 ke liye nahi.
Esa kyu ??
hello @parth_tyagi
once check ur divior formula.
divisor sum=product of all ( P ^(count+1) -1 ) /(P-1)
ans = ans * (count + 1); long b = pow(p, count); long a = p * (b - 1); sum = sum * (1 + (a / (p - 1))); —> ??? agar (count +1) lunga to galat answer aaega. Power 0 waale number ko gp me nahi liya h mene alag se +1 kara h.
working for fine for 10 or 20.
100 ka bhi sahi aa raha hai.
217 hi uska answer
ok. Pata nahi kyu par vscode me mujhe 203 show ho raha h.
must some issue with ur ide
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.