#include<iostream>
#include<algorithm>
using namespace std;
const int Mod = 1e9 + 7;
typedef long long ll;
ll f[1005] = {0, 1, 2};
int main(){
int n;
ios::sync_with_stdio(false);
cin >> n;
for(int i = 3; i <= n; ++i)
f[i] = (f[i - 1] + f[i - 2]) % Mod;
cout << f[n] << endl;
return 0;
}
1031 骨牌覆盖
最新推荐文章于 2018-11-08 17:47:05 发布