• + 0 comments

    basically u just need to make a fucntion to check if a n is divisible by a number from 1 to 1000 or not, and summ all the numbers that are divisors of n.

    class Calculator(AdvancedArithmetic):
        def divisorSum(self, n):
                p=0
                e=0
                for i in range(1,1001):
                    e=(n%i)
                    if e==0:
                        p+=i
                return p
                pass