Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7572 李成蹊 求出e的值 C++ 通过 0 MS 248 KB 246 2023-02-04 22:06:12

Tests(1/1):


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


测评信息: