提交时间:2023-10-04 10:04:23

运行 ID: 104829

#include<bits/stdc++.h> using namespace std; #define int unsigned long long int f[1010],n; signed main() { f[1]=1; cin>>n; for(int i=2;i<=n;++i) (i%2)?f[i]=f[i-1]:f[i]=f[i-1]+f[i/2]; cout<<f[n]; return 0; }