7 条题解

  • 0
    @ 2024-11-25 13:37:46

    #include<bits/stdc++.h> using namespace std; int main() { int n,c; double a=1.0,s=0.0; cin>>n; for(int i=1;i<=n;i++) { a=1; for(int j=1;j<=i;j++) { a=a*j; } s=s+1.0/a; } cout<<fixed<<setprecision(5)<<s; return 0; }

    信息

    ID
    67
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    144
    已通过
    59
    上传者