| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 74643 | sh25_shenpy | 求出e的值 | C++ | 通过 | 0 MS | 244 KB | 297 | 2025-11-30 13:28:45 |
#include<bits/stdc++.h> using namespace std; int main() { int n,k=1; double e=1; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=i;j++){ k*=j; } e+=(1.0*1/k); k=1; } cout<<fixed<<setprecision(10)<<e; return 0; }