-->
当前位置:首页 > 题库

PROGRAMMING:Fibonacci sequence (I)

Luz5年前 (2021-05-10)题库473
Known Fibonacci sequence $$f_{ n} = F_{ n-1} +F_{ n-2}(n>=3), F_ 1 = 1, F_ 2=1$$
The n-th term of the sequence is solved recursively.
###Input format:
Enter a positive integer n $$(1 < = n < = 40) $$.
###Output format:
Output a number, the nth item of the sequence
###Input sample 1:
```in
one
```
###Output sample 1:
```out
one
```
###Input sample 2:
```in
three
```
###Output sample 2:
```out
two
```







answer:If there is no answer, please comment