Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7571 李成蹊 求出e的值 C++ 解答错误 0 MS 252 KB 243 2023-02-04 22:05:11

Tests(0/1):


#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; }


测评信息: