|
|
back to boardsolution is here f[] is an array of fibonacci numbers cout << f[n] + f[n-1] + f[n-2]; except 1 and 2, if (n == 1 || n == 2) cout << 2; Re: solution is here Can you explain why this works? I can't seem to draw a relationship with the fibonacci sequence from the problem statement. |
|
|