python newbie——PE No.2
摘要:
斐波那契数列中的每一项被定义为前两项之和。从1和2开始,斐波那契数列的前十项为: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... 考虑斐波那契数列中数值不超过4百万的项,找出这些项中值为偶数的项之和。 list = [1, 2]temp = 3while temp <= 4000000: list.append(temp) temp = sum... 阅读全文
posted @ 2013-04-04 20:12
XLiao
阅读(189)
评论(0)
推荐(0)
浙公网安备 33010602011771号