std

07yintaobo 2022-12-03 10:53:27 8 返回题目

#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
double e = 1.0;
signed main () {
	cin >> n;
	int p = 1;
	for (int i = 1; i <= n; i++) {
		p *= i;
		e += 1.0 / (p * 1.0);
	}
	cout << fixed << setprecision(10) << e << endl;
	return 0;
}
{{ vote && vote.total.up }}