Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
41928 陈栋 求解函数 C++ Accepted 2 MS 292 KB 218 2022-11-11 20:59:35

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; double x,n; double f(double i){ if(i==1) return x/(i+x); else return x/(i+f(i-1)); } int main(){ cin>>x>>n; cout<<fixed<<setprecision(2)<<f(n); return 0; }