sir why my code is not running for test cases in question although it gave right ans for sample test case link to code is
Even and odd divisor wa
Hi Tanna, there is a minor mistake in your implementation. Try running your code to find answer for the query 9.
9 has 3 odd divisors 1,3 and 9 and no even divisors. So the expected output is -13.
You code gives the output -16. You are counting 3 two times instead of one.
Hope this information helps you debug your code. Let me know if you need further help.