Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3229 杨洋杰 求解函数 C++ Accepted 0 MS 292 KB 266 2024-04-20 17:40:25

Tests(10/10):


Code:

#include<iostream> #include<cstdio> #include<iomanip> using namespace std; double f(int x,double n){ if(n==1) return x*1.0/(n+x); return x*1.0/(n+f(x,n-1)); } int main(){ double x,n; cin>>x>>n; printf("%.2lf",f(x,n)); return 0; }