文章
49
粉丝
90
获赞
9
访问
26.7k
#include<iostream> using namespace std; int main() { int n; unsigned long long a[71]; a[0] = a[1] = 1; a[2] = 2; a[3] = 4; for (int i = 4; i <= 70; i++) { a[i] = 2 * a[i - 1] - a[i - 4]; } while (cin >> n) { cout << a[n] << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发