I wrote down the code for this problem but it does not accept completely.
Code Link - https://ide.codingblocks.com/s/217482
can you please help to find out where I am going wrong.
Find It in Number theory
Hi @imsaurabh
Link with changes : https://ide.codingblocks.com/s/218161
Make separate cases for numbers 1, 2 and 3. And for all other numbers run loop upto sqrt(val) , Add in both factors only if(i!=(val/i)).
Hope it Helps.