Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147023 陈奕涵 求解函数 C++ Accepted 0 MS 292 KB 283 2026-02-02 11:42:09

Tests(10/10):


Code:

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