| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 83420 | sh25_shengmy | 求出e的值 | C++ | 通过 | 0 MS | 252 KB | 315 | 2026-01-25 21:30:19 |
#include<bits/stdc++.h> using namespace std; int jc(int n){ int s=1; for(int i=1;i<=n;++i){ s*=i; } return s; } int main() { double e=1; int f; cin>>f; for(int k=1;k<=f;++k){ e+=1.0/jc(k); } cout<<fixed<<setprecision(10)<<e; return 0; }