提交时间:2024-05-18 15:07:00
运行 ID: 147413
#include<iostream> #include<cmath> #include<iomanip> using namespace std; double y(double x,int n){ if(n==1) return sqrt(x+n); else return sqrt(n+(y(x,n-1))); } int main(){ int n; double x; cin>>x>>n; cout<<fixed<<setprecision(2)<<y(x,n); return 0; }