매일매일 IT

[JavaProgramming] Even Fibonacci numbers 본문

Programming Language/JAVA

[JavaProgramming] Even Fibonacci numbers

Teeeeeeemo 2018. 1. 26. 03:47

 자바ㅠㅠ!! 피보나치 수열에서 짝수의 합 구하기

 Each new term in the Fibonacci sequence is generated by adding the previous two terms. [ 피보나치 수열의 각 새로운 항은 앞의 두 항을 더하여 생성된다.] 

By starting with 1 and 2, the first 10 terms will be: [ 1과 2로 시작하면 처음 10 개의 항은 다음과 같다.]

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... [ 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...]

By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. [ 값이 4 백만을 초과하지 않는 피보나치 수열의 항을 고려함으로써 짝수 값의 합을 구하라.]





Comments