Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
83851 sh25_zhoumy 求出e的值 C++ 通过 0 MS 252 KB 283 2026-02-03 11:28:35

Tests(1/1):


#include<bits/stdc++.h> using namespace std; long jc(short a){ if(a==1) return 1; else return a*jc(a-1); } int main() { int n; cin>>n; double e=1; for(int i=1;i<=n;++i) e+=1.0/jc(i); cout<<fixed<<setprecision(10)<<e; return 0; }


测评信息: