My count of frequency of divisors is not working properly


my code please help me find the mistake

Hello @be10046.19, your error is in divisor function. But the thing is not about that error main thing is about the logic. Your logic is taking too much time. It’s complexity is around n^2 and you need to improve this. So pls think of another logic or try to optimize this.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!