提交时间:2023-02-04 22:05:11

运行 ID: 7571

#include<bits/stdc++.h> using namespace std; int main() { int m; double e=1.0; cin>>m; int i=1; int xi=1; while(i<=m){ xi=xi*i; e+=(float)(1.0*1/xi); i++; } cout<<fixed<<setprecision(7)<<e<<011; return 0; }