Some python stuff???
parent
8f0915640c
commit
e0aab0618b
|
@ -0,0 +1,28 @@
|
|||
fibs2 = [1, 2, 3, 5, 8, 13]
|
||||
|
||||
i = 1
|
||||
j = 2
|
||||
b = 0
|
||||
n = 4000000
|
||||
fibs = []
|
||||
fibs.append(i)
|
||||
fibs.append(j)
|
||||
|
||||
while b < n:
|
||||
b = i + j
|
||||
if b < n:
|
||||
fibs.append(b)
|
||||
else:
|
||||
fibs
|
||||
i = j
|
||||
j = b
|
||||
|
||||
count = 0
|
||||
for fib in fibs:
|
||||
if (fib % 2) == 0:
|
||||
count += fib
|
||||
else:
|
||||
count += 0
|
||||
|
||||
print(count)
|
||||
|
Loading…
Reference in New Issue