Given an array A of integers and integer K, return the maximum S such that there exist i < j with A[i] + A[j] = S and S < K. If no i, j exist satisfying this equation, return -1
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
If we list all the natural numbers from 0 – 40 that are multiples of 3 and 5, we get 15 and 30 only.
The sum of these multiples is 45.
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.
The sum of these multiples is 23.