Adopted new convention from template

This commit is contained in:
David Doblas Jiménez 2022-09-28 19:34:11 +02:00
parent 22ad3dab01
commit a9b11d4e0d

View File

@ -32,12 +32,13 @@ def compute():
""" """
n = 10_000 n = 10_000
sum_amicable = 0 ans = 0
for i in range(1, n): for i in range(1, n):
value = sum_divisors(i) value = sum_divisors(i)
if i != value and sum_divisors(value) == i: if i != value and sum_divisors(value) == i:
sum_amicable += i ans += i
return sum_amicable
return ans
if __name__ == "__main__": if __name__ == "__main__":