<span>分块</span>
LL fenkuai(LL k){
LL j;
LL ans=0;
for (LL i=1;i<=k;i=j+1){
j=n/(n/i);
ans+=(j-i+1)%mod*((n/i)%mod)%mod;
ans%=mod;
}
return ans;
}
LL fenkuai(LL k){
LL j;
LL ans=0;
for (LL i=1;i<=k;i=j+1){
j=n/(n/i);
ans+=(j-i+1)%mod*((n/i)%mod)%mod;
ans%=mod;
}
return ans;
}
相关推荐