Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
243 Benson 求解函数 C++ Accepted 0 MS 292 KB 325 2022-07-22 10:54:58

Tests(10/10):


Code:

#include<iostream> #include<cstring> #include<cmath> using namespace std; double fc(int x,int n) { if(n==1) { return (double)x/(1+x); } else { return (double)x/(n+fc(x,n-1)); } } int main() { double a,b; cin>>a>>b; printf("%.2lf",fc(a,b)); return 0; }