打表法求因子之和

版权声明:转载请注明出处 https://blog.csdn.net/pangel18/article/details/45894333
int h[maxn+5];
void init(){
    for(int i=1; i<=maxn; i++){
        for(int j=1; i*j<=maxn; j++){
            h[i*j]+=i;
        }
    }
}

猜你喜欢

转载自blog.csdn.net/pangel18/article/details/45894333
今日推荐