Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3201 | 邓小龙 | 求解函数 | C++ | Accepted | 0 MS | 236 KB | 238 | 2024-04-19 19:40:53 |
#include<cstdio> using namespace std; double f(double x,double n){ if(n==1) return x/(n+x); return x/(n+f(x,n-1)); } int main(){ double x,n; scanf("%lf%lf",&x,&n); printf("%.2lf",f(x,n)); return 0; }