thanks Darko, now the idea is quite clearDarko wrote:I don't think that is correct (the case for 20) - you get the correct answer, but you don't remove first and last - you just remove 1 as a divisor every time you count them (because 1=1^2=1^3...).
seeing the above discussion , one of my assumption goes wrong...
I thought ppl who reply have actually the accepted code with them...
but seeing differnt idea i think either my asumption is wrong or the test data is weak..
the chances of the later being very very less