| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 133916 | 谭思宸 | 求解函数 | C++ | Accepted | 1 MS | 288 KB | 389 | 2025-10-25 10:18:25 |
#include<iostream> #include<math.h> #include<string.h> using namespace std; double fb(double x, double n){ if(n == 1){ return x * 1.0 / (1 + x) * 1.0; // 装换 }else{ return x * 1.0 / (n + fb(x, n-1)); } } int main(){ double n, x; double ans; scanf("%lf %lf", &x, &n); ans = fb(x, n); printf("%.2lf", ans); return 0; }