Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102351 | 夏梓瑞 | 求解函数 | C++ | Wrong Answer | 0 MS | 288 KB | 527 | 2024-12-21 15:18:10 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min()\fabs() #include<ctime> #include<cstdlib> using namespace std; double w(double x,double n){ if(n==1) return x/(x+1); else return x/(n+w(1,n-1)); if(n==0 || x==0) return 0; } int main(){ double a,b; cin>>a>>b; printf("%.2lf",w(a,b)); return 0; }
------Input------
91 48
------Answer-----
1.83
------Your output-----
1.89