求助大佬!50分!

P1009 [NOIP1998 普及组] 阶乘之和

jcjkyx110507 @ 2023-11-24 20:56:43

#include<bits/stdc++.h>
using namespace std;
int main(){
     unsigned long n,ans=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        long long f=1;
        for(int j=1;j<=i;j++)
        f*=j;
        ans+=f;
    }
    cout<<ans<<endl;
    return 0;
}

by xiaoshumiao @ 2023-11-24 21:00:04

@jinzhilong 这题需要用高精度(即答案会超出 unsigned long long 的范围),建议看题解学习。


by NO_OI_NO_LIFE @ 2023-11-24 21:04:15

@xiaoshumiao 你好,请问一下:怎么认证2023 CSP-J 1=


by jcjkyx110507 @ 2023-11-24 21:06:04

@xiaoshumiao 可否展示一下您的代码


by NO_OI_NO_LIFE @ 2023-11-24 21:06:56

@jinzhilong 请上OI-Wiki自己去学习或看题解


by danlao @ 2023-11-24 21:07:24

@zyh0516_lucky https://www.luogu.com.cn/discuss/735166


by jcjkyx110507 @ 2023-11-24 21:08:17

@zyh0516_lucky https://www.luogu.com.cn/user/setting#information

应该在这!


by NO_OI_NO_LIFE @ 2023-11-24 21:08:20

@xiaoshumiao 是因为地区原因吗,我一直显示洛谷没有更新,可是3k都说了已经更新了


by jcjkyx110507 @ 2023-11-24 21:10:07

@zyh0516_lucky 可否发一下链接


by danlao @ 2023-11-24 21:11:37

@zyh0516_lucky https://help.luogu.com.cn/manual/luogu/account/award-certify


by NO_OI_NO_LIFE @ 2023-11-24 21:12:28

@jinzhilong @yaodiguoan thx我在CCF名单查询上还没有显示,还是再等等吧


| 下一页