• + 0 comments
    def divisors(n):
        # Write your code here
        if n%2 == 1:
            return 0
        
        ans = 0
        n = int(n/2)
        for i in range(1, int(math.sqrt(n)+1)):
            if n % i == 0 and i**2 != n:
                ans += 2
            if i**2 == n:
                ans += 1
        return ans