simplifying THIS fibonacci method

前端 未结 0 1662
独厮守ぢ
独厮守ぢ 2021-01-14 08:59

so my work was to convert this method:

long fib(long n) {
long i = -1, a = 0, b = 1;
while (++i != n)
b = a + (a = b);
return a;
}

into anoth

相关标签:
回答
  • 消灭零回复
提交回复
热议问题