/*
连接:http://noi.openjudge.cn
*/
1
#include<iostream> 2 #include<cstring> 3 #include<string> 4 using namespace std; 5 const int MAXN=25; 6 int main() 7 { 8 int n; 9 int dp[MAXN]; 10 dp[1]=1,dp[0]=1; 11 12 cin>>n; 13 for(int i=2;i<=n;i++) 14 { 15 dp[i]=dp[i-1]+dp[i-2]; 16 } 17 18 19 cout<<dp[n]<<endl; 20 return 0; 21 }

 

 posted on 2019-03-29 19:59  Goven  阅读(43)  评论(0)    收藏  举报