Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3228 莫业祁 求解函数 C++ Accepted 0 MS 288 KB 219 2024-04-20 16:55:05

Tests(10/10):


Code:

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