Run ID:100704

提交时间:2024-12-11 19:46:37

#include <bits/stdc++.h> using namespace std; double f(int x,int n) { if(n==0) { return x; }else { return x*1.0/(n+f(x,n-1)); } } int main() { int x,n; cin>>x>>n; cout<<fixed<<setprecision(2)<<f(x,n)<<endl; return 0; }