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

PROGRAMMING:I'm a free question

Luz5年前 (2021-05-10)题库563
Now there is an equation f (n) = f (n - 1) + 2 * f (n - 2) + 3 * f (n - 3), f (1) = 1, f (2) = 2, f (3) = 3,
Now give a n, please find out f (n) to take the module of 1e9 + 7. See here, do you want to shout Wuhu, take off, always send points.
###Input format:
Simple n (4 < = n < = 1e9)
###Output format:
Output f (n) moduling 1e9 + 7
###Input example:
Here is a set of inputs. For example:
```in
four
```
###Output example:
The corresponding output is given here. For example:
```out
ten
```







answer:If there is no answer, please comment