mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +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