题解 | #牛牛的Hermite多项式#
牛牛的Hermite多项式
https://www.nowcoder.com/practice/0c58f8e5673a406cb0e2f5ccf2c671d4
#include <stdio.h> int h(int x, int n); int main() { int n = 0; int x = 0; scanf("%d %d", &n, &x); printf("%d", h(x, n)); return 0; } int h(int x, int n) { if (0 == n) { return 1; } else if (1 == n) { return 2 * n; } else { return 2 * x * h(x, n - 1) - 2 * (n - 1) * h(x, n - 2); } }