Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
6665 毕潇天 求出e的值 C++ 通过 0 MS 248 KB 270 2023-01-28 12:51:10

Tests(1/1):


#include <iostream> #include <iomanip> using namespace std; int main() { int n; cin >> n; double e=1; for(int i=1;i<=n;i++){ int k=1; for(int j=1;j<=i;j++){ k*=j; } e+=1.0/k; } cout << fixed << setprecision(10) << e; return 0; }


测评信息: