delete pics to save space
This commit is contained in:
17
history_source/信息学奥赛一本通/1.6.2.3.cpp
Normal file
17
history_source/信息学奥赛一本通/1.6.2.3.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
double h(int n,double x)
|
||||
{
|
||||
if(n==0) return 1;
|
||||
if(n==1) return 2*x;
|
||||
return 2*x*h(n-1,x)-2*(n-1)*h(n-2,x);
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
double x;
|
||||
scanf("%d%lf",&n,&x);
|
||||
printf("%g\n",h(n,x));
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user