代码揍这么简单:
123
int fibo(int n){ return (sqrt(5)/5)*(pow((1+sqrt(5))/2,n)-pow((1-sqrt(5))/2,n));}
要是再加个快速幂就更棒了(够快了,懒得写)
Welcome to my other publishing channels