摘要: Problem Description 把一个偶数拆成两个不同素数的和,有几种拆法呢? Input 输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。 Output 对应每个偶数,输出其拆成不同素数的个数,每个结果占一行。 Sample Input 30 26 0 Sample Output 3 2 **************************************** **************************************************************************#include using na. 阅读全文
posted @ 2013-07-23 23:20 博园少主 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #include int s; int ggt(int x){ if(xint s;int ggt(int x){ if(xusing namespace std;int main(){ int t,n,a[40]={0,1,2},i; cin>>t; while(t--) { cin>>n; for(i=3;iusing namespace std;int main(){ int t,n,a[41]={0,0,1,2},i; cin>>t; while(t--) { cin>>n; for(i=4;i<=n;i++) a[i]=a[i-1 阅读全文
posted @ 2013-07-23 23:17 博园少主 阅读(180) 评论(0) 推荐(0) 编辑