|
|
вернуться в форумAC with this formula Послано Sergey 9 окт 2011 01:01 I've used this formula to solve this problem: a(n) = 2^(b(n)-1) + a(n - c(1+b(n))) b(n) = -1+floor(log(((n+0.2)*sqrt(5)))/log((1+sqrt(5))/2)); c(0) = 0, c(1) = 1, c(n) = c(n-1) + c(n-2) Re: AC with this formula INSANE! Re: AC with this formula Послано htzfun 1 май 2012 17:44 I don't want to live in this world anymore. Re: AC with this formula wow!!!! you probably made an easy thing too complicated. Re: AC with this formula Looks like you're using golden ratio to calculate Fibonacci Re: AC with this formula Way too complicated. I solved entirely using bitwise operations and an array with the first 64 Fibonacci numbers. |
|
|