杭电ACM2012 素数判定.

问题描述:

杭电ACM2012 素数判定.
素数判定
Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)
Total Submission(s):22088 Accepted Submission(s):7413
Problem Description
对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39

#include
#include
int main()
{
int x,y,n,i,j,k,s,p=0;
while(scanf("%d%d",&x,&y))
{
p=0;//每次都要进行初始化
if(x==0&&y==0) break;
if(x>y)
{
int t=x;
x=y;
y=t;
}
for(n=x;n