You are viewing a single comment's thread. Return to all comments →
class Calculator(AdvancedArithmetic): def divisorSum(self, n: int) -> int: if n < 2: return n divisors = [1, n] divisors.extend(filter(lambda x: n % x == 0, range(2, int(n / 2) + 1))) return sum(divisors)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →