2012
来源:互联网 发布:免费股市分析软件 编辑:程序博客网 时间:2024/04/29 15:05
#include<stdio.h>
#include<math.h>
int isprime(int n)
{
int i;
for(i=2;i<=n/2;i++)
if(n%i==0)
return 0;
return 1;
}
int main()
{
int x,y,i,j,m,n,key;
while(scanf("%d %d",&x,&y)!=EOF&&x!=0|y!=0)
{
for (j=i=x;i<y;i++)
{
key=i*i+i+41;
if (isprime(key)==1)j++;
}
if(i==j) printf("OK/n");
else printf("Sorry/n");
}
return 0;
}
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012;
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 2012
- 二分搜索树排序binary search sorting的c++实现
- 如何在Dreamweaver中浏览ASP文件
- 使用maven创建新项目出现Unable to determine the release version错误
- js笔记之Math random()、ceil()、floor()、round()
- VS2008打开.net 2.0项目常见问题
- 2012
- jQuery常用的元素查找方法总结
- eclipse下安装js插件-spket(支持Ext)
- 微博
- freescale R10 ipu lib 分析 - ipu_common.c
- 慎用ASP.Net的validateRequest=“false”
- postgresql 预写式日志(Write Ahead Long)
- STL对对象的排序
- SQL重复记录查询