Beispiel #1
0
def main():
    result = 0
    for num in range(2, 10001):
        proper_sum = proper_divisor_sum(num)

        if num != proper_sum and proper_divisor_sum(proper_sum) == num:
            result += proper_sum

    print(result)
Beispiel #2
0
def main():
    limit, result = 20162, 0
    abundant_numbers = set()

    for num in range(1, limit):
        if proper_divisor_sum(num) > num:
            abundant_numbers.add(num)

        if not any((num - x) in abundant_numbers for x in abundant_numbers):
            result += num
    print(result)