CE了而且一点提示都没有
查看原帖
CE了而且一点提示都没有
893114
denghuolanshan_1004楼主2023/6/10 11:24
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int n;
    cin>>n;
    double ans;
    double now=1;
    for(int i=0;i<=n;i++){
        for(int j=1;j<=i;j++)now*=j
        now=1/now;
        ans+=now;
        now=1;
    }
    printf("%.10lf",ans);
    return 0;
}
2023/6/10 11:24
加载中...