mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 10:48:58 +08:00
Project Euler problem 2 pyhtonic solution (#629)
* Project Euler problem 2 pyhtonic solution * Project Euler problem 2 made small changes
This commit is contained in:
@ -12,9 +12,7 @@ a=0
|
||||
b=2
|
||||
count=0
|
||||
while 4*b+a<n:
|
||||
c=4*b+a
|
||||
a=b
|
||||
b=c
|
||||
count=count+a
|
||||
a, b = b, 4*b+a
|
||||
count+= a
|
||||
print(count+b)
|
||||
|
||||
|
Reference in New Issue
Block a user