czp5900 @ 2024-10-05 08:03:39
大佬帮忙看一下哪里错了
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int s=0;
for(int i =1;i<n;i++){
s+=n*(n-i);
cout << s;
}
return 0;
}
by liujinxv123 @ 2024-10-05 08:05:41
by ATION001 @ 2024-10-05 09:21:08
@czp5900
by fonglingyueyin @ 2024-10-08 20:47:29
by luogu_00 @ 2024-10-12 17:52:11
用 unsigned long long
,就算不会高精度,也能最接近AC。
by czp5900 @ 2024-11-06 13:15:40
@ATION001 谢谢
by czp5900 @ 2024-11-09 21:32:04
@czp5900 如果有人有建议可以加一下,方便私聊 https://www.luogu.com.cn/team/93346