摘要: 【输入格式】 一个整数M 【输出格式】 输出所有小于M 的亲和数对的和 300<=M<=2000000 1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 using namespace std; 5 6 const int 阅读全文
posted @ 2020-11-08 20:19 code1288 阅读(153) 评论(0) 推荐(0)
摘要: 质数是指在大于1的自然数中,除了1和它本身以外不再有其他因数的自然数。 最小的质数为2 1 bool panzhi(int x) 2 { 3 if(x<2) 4 { 5 return false; 6 } 7 for(int i=2;i*i<=x;i++) 8 { 9 if(x%i==0) 10 { 阅读全文
posted @ 2020-11-08 19:22 code1288 阅读(94) 评论(0) 推荐(0)