【题目描述】
【输入】
【输出】
【输入样例】
12
【输出样例】
4.00
#include<iostream> #include<cstdio> using namespace std; int n,x; double hmt(int n,int x){//返回型递归,函数须return if(n==0)return 1; if(n==1)return 2.0*x; if(n>0) return 2.0*x*hmt(n-1,x)-2.0*(n-1)*hmt(n-2,x); } int main() { cin>>n>>x; printf("%.2f",hmt(n,x)); return 0; }//OK
Powered by 孙会中 @ 2024-2026【 www.sunhuizhong.cn 】All rights reserved
访问统计:386183 本月:281 上月:799 今日:7 昨日:6 当前在线:1人