提交时间:2023-10-31 20:41:57
运行 ID: 29601
#include <bits/stdc++.h> using namespace std; int main() { int a[100] = {1, 1, 1, 1}; for (int i = 4; i <= 90; ++ i) a[i] = a[i - 1] + a[i - 2] + a[i - 3]; int b; cin >> b; while (b) { cout << a[b] << '\n'; cin >> b; } return 0; }