Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157031 Kevin 求解函数 C++ Accepted 1 MS 300 KB 229 2026-07-12 17:54:34

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; double f(double x,int n){ if(n==1) return x/(1.0+x); else return x/(n+f(x,n-1)); } int main() { double x,n,m; cin>>x>>n; m=f(x,n); printf("%.2lf",m); return 0; }