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