Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Is there any formula to calculate nth fibonacci number ?

$
0
0

Suppose we are given, a(0)=x ; a(1)=y

and the relation, a[i]=a[i-1]+a[i-2]

and , we are asked to calculate a(n) , how to calculate it if n is as big as 10^9 ?

Thanks ! :-)


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>