2 条题解
-
1
#include<bits/stdc++.h> using namespace std; bool x(int n){ if(n<=1)return false; if(n2)return true; if(n%20)return false; for(int i=3;i<=sqrt(n);i+=2){ if(n%i==0)return false; } return true; } int main(){ for(int a=1;a<=9;a++){ for(int b=0;b<=9;b++){ int num=a100+b10+a; if(x(num)){ cout<<num<<endl; } } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std; int main(){ cout<<101<<endl; cout<<131<<endl; cout<<151<<endl; cout<<181<<endl; cout<<191<<endl; cout<<313<<endl; cout<<353<<endl; cout<<373<<endl; cout<<383<<endl; cout<<727<<endl; cout<<757<<endl; cout<<787<<endl; cout<<797<<endl; cout<<919<<endl; cout<<929<<endl; return 0; }
- 1
信息
- ID
- 159
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 161
- 已通过
- 44
- 上传者