提交时间:2024-05-18 14:56:53

运行 ID: 147363

#include<iostream> #include<cstdio> #include<cmath> using namespace std; float f(float x,int n){ if(n==1){ return(sqrt(n+x)); } else{ return(sqrt(n+f(x,n-1))); } } int main(){ float a; int b; cin>>a>>b; float j=f(a,b); printf("%.2f",j); }