摘要:
易错点 if((is_nature(n)==1&&is_nature(n+6)==1)||(is_nature(n)==1&&is_nature(n-6)==1)){ 此处判断不能只考虑(n+6)为素数的情况,而忽略了(n-6)为素数的情况 代码 #include <iostream> #inclu 阅读全文
posted @ 2022-07-14 23:51
qwasdasd
阅读(160)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> using namespace std; int tmpb[101]; int main() { int n; int a; int mina=1001; int b; int maxb=-1; cin>>n; for 阅读全文
posted @ 2022-07-14 22:17
qwasdasd
阅读(39)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> using namespace std; int a[100][100]; int main() { int n,k,x; cin>>n>>k>>x; for(int i=0;i<n;i++){ for(int j=0 阅读全文
posted @ 2022-07-14 21:13
qwasdasd
阅读(42)
评论(0)
推荐(0)
摘要:
思路 当一个数的所有因子的和(不包括自身)大于或等于这个数,那么这个数就是大美数 代码 #include <iostream> #include <cstdio> using namespace std; bool is_b(int a){ int cnt=0; for(int i=1;i<a;i+ 阅读全文
posted @ 2022-07-14 19:58
qwasdasd
阅读(164)
评论(0)
推荐(0)
摘要:
注意点 一开始解这道题只过了两个点,但翻了各种题解,感觉思路没有任何问题。最后终于找到一篇博客提供测试点的数据,发现还是漏了在循环后对数组的初始化。 代码 #include <iostream> #include <cstdio> #include <string> #include <utilit 阅读全文
posted @ 2022-07-14 19:30
qwasdasd
阅读(41)
评论(0)
推荐(0)
摘要:
错误点 2是素数。。。这一处考虑错了 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; bool is_nature(long long a){ if(a==1||a==0){ return 阅读全文
posted @ 2022-07-14 13:55
qwasdasd
阅读(17)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <string> #include <map> using namespace std; int main() { string s1,s2; map<char,int> mp; getline(ci 阅读全文
posted @ 2022-07-14 11:35
qwasdasd
阅读(35)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> using namespace std; long long a[1001]; int main() { for(int i=0;i<1000;i++){ a[i]=0; } long long n,m; long l 阅读全文
posted @ 2022-07-14 11:26
qwasdasd
阅读(26)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int main() { int m; int a; int tmp; int tmp3; int tmp4; int tmp5; int 阅读全文
posted @ 2022-07-14 10:46
qwasdasd
阅读(27)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <string> using namespace std; string a[100001]; string b[1001]; int main() { int n,m; int k; string 阅读全文
posted @ 2022-07-14 10:13
qwasdasd
阅读(20)
评论(0)
推荐(0)

浙公网安备 33010602011771号