delete pics to save space
This commit is contained in:
14
1.1984.cpp
Normal file
14
1.1984.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include<cstdio>
|
||||
int n; double now,res;
|
||||
int main()
|
||||
{
|
||||
scanf("%d",&n);
|
||||
now=420000.0/n;
|
||||
for(int i=1;i<=n;i++)
|
||||
{
|
||||
res+=now;
|
||||
now*=(1-0.5/i);
|
||||
}
|
||||
printf("%.2lf\n",res);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user