杭电 2012。
程序代码:#include <stdio.h>
int main()
{
int x,y,i,j,s,count;
while(scanf("%d%d",&x,&y)!=EOF&&!(x==0&&y==0))
{
count=0;
for(i=x;i<=y;i++)
{
s=x*x+x+41;
for(j=2;j<=s;j++)
if(s%j==0)
break;
if(s==j)
count++;
}
if(count==y-x+1)
printf("OK\n");
else
printf("Sorry\n");
}
return 0;
}
告诉我哪错了,我一定改⊙︿⊙









