提交时间:2023-11-25 08:17:00
运行 ID: 111813
#include <iostream> using namespace std; int dp[100005]; int main(){ int n; cin >> n; dp[0]=1; for (int i = 0;i<=n;i++){ dp[i+1]+=dp[i]; dp[i+2]+=dp[i]; } cout << dp[n]; }