ans

DOZIE 2022-06-11 15:32:06 13 返回题目

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

{{ vote && vote.total.up }}

共 1 条回复

wurenchao

NB