Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7353 suxing 求出e的值 C++ 解答错误 0 MS 252 KB 245 2023-02-03 18:37:01

Tests(0/1):


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


测评信息: