杭电ACM2012 素数判定.素数判定Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)Total Submission(s):22088 Accepted Submission(s):7413Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 22:27:29
杭电ACM2012 素数判定.素数判定Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)Total Submission(s):22088 Accepted Submission(s):7413Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值
杭电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
杭电ACM2012 素数判定.素数判定Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)Total Submission(s):22088 Accepted Submission(s):7413Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值
#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