1165:Hermite多项式

#include<iostream>
#include<cstdio>
using namespace std;
double h(int n,int x)
{
    if(n==0)return 1;
    else if(n==1)return 2*x;
    else 
        return 2*x*h(n-1,x)-2*(n-1)*h(n-2,x);
}
int main()
{
    int n;
    int m;
    scanf("%d%d",&m,&n);
    printf("%.2lf",h(m,n));
    return 0;
}100'

猜你喜欢

转载自blog.csdn.net/qq_42552468/article/details/81240581