pages:
- 1
Azure SAYS
hey guys can u give me some guidance to solve this problem ??
BECCA SAYS
Hello
You don't need any "Bignum" things in this problem.
1) Add The input by 2;
2) if the remainder from the division of 4 gave you 0 print YES else print NO!
For example:
1: (1 + 2) mod 4 <> 0 So your answer should be no.
4: (4 + 2) mod 4 <> 0 So your answer should be no again.
2: (2 + 2) mod 4 = 0 So your answer should be yes!
Azure SAYS
thanks BECCA ;) but what's the reason????
BECCA SAYS
Sorry for the late replie.
The answer is simple. Since (7,11) = (7,7) + (0,4), your sequence is F(n)=4Fibonacci(n)+7Fibonacci(n+1).
Login please!
In order to post something you must login first. You can use the form in the top of this page.