From a9b11d4e0d3e995f835795cfbe798106dd5b34f6 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Wed, 28 Sep 2022 19:34:11 +0200 Subject: [PATCH] Adopted new convention from template --- src/Python/Problems001-050/Problem021.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Python/Problems001-050/Problem021.py b/src/Python/Problems001-050/Problem021.py index 732d184..9966130 100644 --- a/src/Python/Problems001-050/Problem021.py +++ b/src/Python/Problems001-050/Problem021.py @@ -32,12 +32,13 @@ def compute(): """ n = 10_000 - sum_amicable = 0 + ans = 0 for i in range(1, n): value = sum_divisors(i) if i != value and sum_divisors(value) == i: - sum_amicable += i - return sum_amicable + ans += i + + return ans if __name__ == "__main__":