18 lines
172 B
C
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;
|
|
}
|