• + 0 comments
    class Calculator(AdvancedArithmetic):
        def divisorSum(self, n):
            l = []
            if n==1:
                l.append(1)
            for i in range(1,n//2):
                if n%i==0:
                    p = n//i
                    if i not in l:
                        l.append(i)
                    if p not in l:
                        l.append(p)
            return sum(l)