不知道是我看不懂題目還是??
感謝!!
#include<cstdio>
#include<algorithm>
using namespace std;
main(){
int a,b;
while(scanf("%d %d",&a,&b)!=EOF){
int ans=0;
for (int i=min(a,b);i<=max(a,b);i++){
//printf("i=%d ",i);
for (int j=2;j<i;j++){
//printf("j=%d ",j);
if(i%j==0 or j>2 and j%2==2) break;
if (j==i-1) ans++;
}
}
printf("%d\n",ans);
}
}