递推 1166:求f(x,n)

 

#include<iostream>
#include<cmath>
using namespace std;
int main(){
	float x,n,b=0;
	cin>>x>>n;
	b=sqrt(1+x);
	for(int i=2;i<=n;i++){
		b=sqrt(i+b);
	}
	cout<<b;
	
	
	
	return 0;
}

 

posted @ 2024-03-30 08:59  王ys  阅读(36)  评论(0编辑  收藏  举报