0
已解决
王泽轩
资深天翼
资深天翼
#include<iostream>
using namespace std;
int main(){
long long x,y;
long long a,b,c[202020]={0};
cin>>x>>y;
for(int i=1;i<=x;i++){
long long sum=0;
cin>>a>>b;
for(long long i=a+1;i<=b;i++){
if(c[i]==0){
for(long long j=a*i;j<=b;j+=i){
if(c[j]!=1){
c[j]=1;
sum++;
}
}
}
}
if(b>y){
cout<<"Crossing the line\n";
continue;
}
cout<<sum<<endl;
}
return 0;
}
怎么超时了?