标签:数列 sum int 斐波那契 span col print 斐波那契数列 nbsp
1 sum = 0 2 a,b = 0,1 3 while b < 4000000: 4 if b%2 == 0: 5 sum += b 6 a,b = b,a+b 7 print(sum)
15 斐波那契数列数列之和
原文地址:https://www.cnblogs.com/reaix/p/12651194.html