| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147019 | 陈骏睿 | 求解函数 | C++ | Wrong Answer | 1 MS | 276 KB | 418 | 2026-02-02 11:16:30 |
#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() using namespace std; double w(double n,double x){ if(n==1)return x/(1+x); else return x/(n+w(x,n-1)); } int main(){ int n,x; cin>>n>>x; printf("%.2lf\n",w(x,n)); return 0; }
------Input------
91 48
------Answer-----
1.83
------Your output-----
1.88