Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
92520 孙嘉言 求解函数 C++ Accepted 1 MS 296 KB 245 2024-10-05 16:27:10

Tests(10/10):


Code:

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