Problem B: 数列2
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:349
Solved:197
Description
升级斐波那契数列f(n):
1. f(1)=2;
2. f(2)=1;
3. f(n)=f(n-1) + f(n-2) + 1; (n为奇数)
4. f(n)=f(n-1) + f(n-2); (n为偶数)
1. f(1)=2;
2. f(2)=1;
3. f(n)=f(n-1) + f(n-2) + 1; (n为奇数)
4. f(n)=f(n-1) + f(n-2); (n为偶数)
Input
输入一个整数n,n<=30
Output
一个整数
Sample Input Copy
14
Sample Output Copy
753