80分求蒟蒻
查看原帖
80分求蒟蒻
1319065
cxlqwq楼主2024/8/13 22:00
#include <bits/stdc++.h>
using namespace std;

unsigned int h(unsigned int n, unsigned int x) {
	if (n == 0) {
		return 1;
	} else if (n == 1) {
		return 2 * x;
	} else if (n > 1) {
		return 2 * x * h(n - 1, x) - 2 * (n - 1) * h(n - 2, x);
	}
}

int main() {
	unsigned int n, x;
	cin >> n >> x;
	cout << h(n, x);

	return 0;
}
2024/8/13 22:00
加载中...