We define a function $f(x)$.And we know the function expression as following.↵
$$f(x)=f(x-e)+f(x-2) (x>=3)$$↵
$$f(x)=1 (x<=3)$$↵
ps. $e$ means the natural base.↵
We will give you an interger $x(x<=1*10^7)$.Please give us the $f(x)$ in 2 seconds.↵
↵
Can anyone help me.This question has puzzled me for a long time.Thanks.↵
↵
For example↵
Input1↵
~~~~~↵
14↵
~~~~~↵
Output1↵
~~~~~↵
38↵
~~~~~↵
Input2↵
~~~~~↵
5↵
~~~~~↵
Output2↵
~~~~~↵
3↵
~~~~~↵
↵
↵
↵
$$f(x)=f(x-e)+f(x-2) (x>=3)$$↵
$$f(x)=1 (x<
ps. $e$ means the natural base.↵
We will give you an interger $x(x<=1*10^7)$.Please give us the $f(x)$ in 2 seconds.↵
↵
Can anyone help me.This question has puzzled me for a long time.Thanks.↵
↵
For example↵
Input1↵
~~~~~↵
14↵
~~~~~↵
Output1↵
~~~~~↵
38↵
~~~~~↵
Input2↵
~~~~~↵
5↵
~~~~~↵
Output2↵
~~~~~↵
3↵
~~~~~↵
↵
↵
↵