1 solutions

  • 1
    @ 2025-3-14 19:53:14
    #include<bits/stdc++.h>
    using namespace std;
    double Hermite(double n,double x)
    {
    	if(n==0) return 1;
    	if(n==1) return 2*x;
    	return 2*x*Hermite(n-1,x)-2*(n-1)*Hermite(n-2,x);
    }
    int main()
    {
    	double n,x;
    	cin>>n>>x;
    	cout<<fixed<<setprecision(2)<<Hermite(n,x);
    	return 0;
    }
    
    
    • 1

    Information

    ID
    938
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    36
    Accepted
    14
    Uploaded By