Consistency formatting
This commit is contained in:
parent
c793c7e9dd
commit
5c7cec373c
@ -20,8 +20,8 @@ def compute():
|
||||
|
||||
Find the sum of all the multiples of 3 or 5 below 1000.
|
||||
"""
|
||||
|
||||
ans = sum(x for x in range(1000) if (x % 3 == 0 or x % 5 == 0))
|
||||
|
||||
return ans
|
||||
|
||||
|
||||
|
@ -27,12 +27,12 @@ def compute():
|
||||
limit = 4_000_000
|
||||
x, y = 1, 1
|
||||
z = x + y # Because every third Fibonacci number is even
|
||||
|
||||
while z <= limit:
|
||||
ans += z
|
||||
x = y + z
|
||||
y = z + x
|
||||
z = x + y
|
||||
|
||||
return ans
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user