跳至正文
题库3841
#3841

1165. Hermite多项式

查看题目操作

1165. Hermite多项式

题目描述

用递归的方法求Hermite多项式的值

hn(x)={1n=02xn=12xhn−1(x)−2(n−1)hn−2(x)n>1h_n(x)=\begin{cases}1 & n=0\\2x & n=1\\2xh_{n-1}(x)-2(n-1)h_{n-2}(x) & n>1\end{cases}

对给定的 xx 和非负整数 nn,求多项式的值,保留小数点后两位。

输入格式

给定非负整数 nn 和正整数 xx。

输出格式

多项式的值,保留小数点后两位。

1 2
4.00

来源

一本通在线评测 ybtbas-1165