上海互联网做网站,网站被k 原因,常州中小企业网站制作,雅安交通建设集团网站2011-12-12 05:27:32 地址#xff1a;http://acm.hdu.edu.cn/showproblem.php?pid2012 题意#xff1a;中文题。 mark#xff1a;wa了一次#xff0c;超2的。自己以为聪明地写了一个预处理#xff0c;结果忘记把表达式写进去了#xff0c;IsPrme的参数直接写了个i#…2011-12-12 05:27:32 地址http://acm.hdu.edu.cn/showproblem.php?pid2012 题意中文题。 markwa了一次超2的。自己以为聪明地写了一个预处理结果忘记把表达式写进去了IsPrme的参数直接写了个i太2了。 代码 # include stdio.hint IsPrime(int n){int i ;for (i 2 ; i n ; i)if (n%i0) break ;return i n ;}int main (){int i, tab[100] {0}, x, y ;for (i -39 ; i 50 ; i) { tab[i40] (!IsPrime(i*ii41)) ; tab[i40] tab[i39] ; }while (~scanf (%d%d, x, y) (x||y)) puts (tab[x39] tab[y40] ? OK : Sorry) ;return 0 ;} 转载于:https://www.cnblogs.com/lzsz1212/archive/2012/01/06/2314488.html