C-study/04/3/3.c
2021-11-05 00:59:48 +08:00

18 lines
172 B
C

#include<stdio.h>
int main(){
int n;
double a=1,sum=1;
scanf("%d",&n);
for(int i=1;i<=n;i++){
a *= i;
sum += 1/a;
}
printf("%.10lf",sum);
return 0;
}