delete pics to save space
This commit is contained in:
16
history_source/信息学奥赛一本通/1.6.2.5.cpp
Normal file
16
history_source/信息学奥赛一本通/1.6.2.5.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
double f(double x,int n)
|
||||
{
|
||||
if(n==1) return x/(1+x);
|
||||
return x/(n+f(x,n-1));
|
||||
}
|
||||
int main()
|
||||
{
|
||||
double x;
|
||||
int n;
|
||||
scanf("%lf%d",&x,&n);
|
||||
printf("%g\n",f(x,n));
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user