QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
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