#include <iostream>
using namespace std;
const int maxn = 51;
typedef long long ll;
int main() {
ll Lu[maxn][maxn];
Lu[1][1] = 0;
Lu[2][1] = 0;
Lu[2][2] = 1;
for (int i = 3; i < maxn; i++) {
for (int j = 1; j <= i - 1; j++) {
Lu[i][j] = Lu[i - 1][j];
}
Lu[i][i] = Lu[i - 1][i - 1] + Lu[i - 2][i - 2];
}
int n;
while (scanf("%d", &n) != EOF) {
for (int i = 1; i < n; i++)
printf("%d ", Lu[n][i]);
printf("%d\n", Lu[n][n]);
}
return 0;
}
浙工大15新生赛 命运数
最新推荐文章于 2022-12-31 17:50:11 发布