| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 143788 | 高楷伦 | 求解函数 | C++ | Accepted | 0 MS | 300 KB | 477 | 2026-01-17 17:20:06 |
#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 f(double x,double n){ if(n==1) return x/(x+1); else{ return x/(n+f(x,n-1)); } } int main(){ double x,n; cin>>x>>n; printf("%.2f", f(x,n)); return 0; }