QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#627199 | #7046. Function! | N_z_ | Compile Error | / | / | C++23 | 264b | 2024-10-10 15:11:11 | 2024-10-10 15:11:16 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n,a=0,x,y,p=998244353;
cin>>n;
for(x=y=2;x*x<=n;y=++x)
while(y<=n)(a+=x*(n-y+1))%=p,y*=x;
n%=p,(a+=(n*(n+1)%p*(n+2)%p-x*(x-1)%p*(3*n+4-2*x)%p)*166374059%p+p)%=p;
cout<<ans<<endl;
}
详细
answer.code: In function ‘int main()’: answer.code:10:15: error: ‘ans’ was not declared in this scope; did you mean ‘abs’? 10 | cout<<ans<<endl; | ^~~ | abs