1 条题解

  • 0
    @ 2025-1-25 16:33:31

    往往能从题目中获取答案:

    #include<bits/stdc++.h>
    using namespace std;
    double h(double n,double x){
    	if(n==0){
    		return 1.0;
    	}
    	if(n==1){
    		return 2*x;
    	}
    	if(n>1){
    		return 2*x*h(n-1,x)-2*(n-1)*h(n-2,x);
    	}
    }
    int main() {
    	double n,x;
    	cin>>n>>x;
    	printf("%.2lf",h(n,x));
    	return 0;
    }
    
    
    • 1

    信息

    ID
    927
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    (无)
    递交数
    2
    已通过
    2
    上传者