Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7799 鲁家菱 求出e的值 C++ 通过 0 MS 244 KB 232 2023-02-07 16:49:06

Tests(1/1):


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


测评信息: