除法分块

除法分块

C - Fear Factoring

#include
using namespace std;
#define ll unsigned long long int
ll a,b,c,d,e;
ll find(ll n)
{
    ll left,right;
    ll ans=0;
    for(left=1;left<=n;left=right+1)
    {
        right=n/(n/left);
        ll num=(n/left);
        ans+=num*(right-left+1)*(left+right)/2;
    }
    return ans;
}
int main()
{
    cin>>a>>b;
    cout<

你可能感兴趣的:(数学)