mirror of
https://github.com/correl/euler.git
synced 2024-11-27 19:19:50 +00:00
21 lines
353 B
Python
21 lines
353 B
Python
|
from e021 import proper_divisors
|
||
|
|
||
|
abundant = []
|
||
|
total = 1
|
||
|
|
||
|
i = 2
|
||
|
while i < 28123:
|
||
|
s = sum(proper_divisors(i))
|
||
|
if s > i:
|
||
|
abundant.append(i)
|
||
|
summed = False
|
||
|
for a in abundant:
|
||
|
if i - a in abundant:
|
||
|
summed = True
|
||
|
break
|
||
|
if not summed:
|
||
|
total = total + i
|
||
|
i = i + 1
|
||
|
|
||
|
print 'Total:', total
|