提交时间:2023-12-09 08:50:41
运行 ID: 114745
#include<bits/stdc++.h> using namespace std; int a[1010] = {1,2}; signed main(){ int n; scanf("%d",&n); for(int i = 2;i < n;i++){ a[i] += a[i-1]+a[i-2]; } printf("%d",a[n-1]); return 0; }