标签:
0 1 0 0
OK
#include<stdio.h> main(){ int m,i,n,a,sign,j; while(scanf("%d%d",&m,&n)!=EOF&&(m!=0||n!=0)) { sign=0; for(i=m;i<=n;i++) { a=i*i+i+41; for(j=2;j<a/2;j++) { if(a%j==0) {sign=1;break;} } } if(sign==0) {printf("OK\n");} else {printf("Sorry\n");} } }
标签:
原文地址:http://blog.csdn.net/hncu1306602liuqiang/article/details/46388169