Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
30037 | 朱启睿 | 求解函数 | C++ | Accepted | 3 MS | 840 KB | 251 | 2022-07-12 12:28:07 |
#include<iostream> #include<cstdio> using namespace std; double f(double x,double n){ if(n==1.00){ return x/(1.00+x); } return x/(n+f(x,n-1.00)); } int main() { double a,b; cin >> a >> b; printf("%.2lf",f(a,b)); return 0; }