首页 > 代码库 > Project Euler--No.2

Project Euler--No.2


最基本的解法

sum = 0;n = 1;While[Fibonacci[n] <= 4000000,  If[EvenQ[Fibonacci[n]], sum = Fibonacci[n] + sum]; n++]sum

 

Project Euler--No.2