Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130214 黄枳润 求解函数 C++ Accepted 1 MS 300 KB 454 2025-09-08 20:56:43

Tests(10/10):


Code:

#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 g(double x,double n){ if(n==1){ return x/(1+x); }else{ return x/(n+g(x,n-1)); } } int main(){ double a,b; cin>>a>>b; printf("%.2lf",g(a,b)); return 0; }