QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#627199#7046. Function!N_z_Compile Error//C++23264b2024-10-10 15:11:112024-10-10 15:11:16

Judging History

你现在查看的是最新测评结果

  • [2024-10-10 15:11:16]
  • 评测
  • [2024-10-10 15:11:11]
  • 提交

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