不是质因子分解,质因子分解会T。
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<cmath>
using namespace std;
int num[1000000];
void deal()
{
for(int i = 2; i < 1000000; i++)
num[i] = 1;
for(int i = 2; i < 1000000; i++)
for(int j = i * 2; j < 1000000; j += i)
num[j] += i;
}
int main()
{
//freopen("1001.in", "r", stdin);
int l, r, bad, p;
p = 1;
deal();
while(scanf......
阅读全文