You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
170 B
Python

def is_abundant(n):
fctr_sum = sum([fctr for fctr in range(1, n) if n % fctr == 0])
return fctr_sum > n
print(is_abundant(12))
print(is_abundant(13))