Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
9334 | 仇翌楷 | 求解函数 | C++ | Accepted | 4 MS | 788 KB | 234 | 2021-04-10 19:24:59 |
#include <bits/stdc++.h> using namespace std; double f(double x, double n) { if (n == 1) return x / (1 + x); return x / (n + f(x, n - 1)); } int main() { int n, m; cin >> n >> m; printf("%.2lf", f(n, m)); return 0; }