Run ID:28032

提交时间:2022-06-12 19:09:36

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