| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140693 | 吕毅心 | 寻找绝对素数 | C++ | Accepted | 9 MS | 272 KB | 811 | 2025-12-19 17:23:02 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; bool zoom(int a){ if(a==0||a==1) return false; for(int i=2;i*i<=a;i++){ if(a%i==0) return false; } return true; } int zip(int x){ int r=0; while(x!=0){ r=(r*10+x%10); x=x/10; } return zoom(r); } int main(){ int a,b,c=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(zoom(i)&&zip(i)){ if(c==0){ cout<<i; }else{ cout<<","<<i; }c++; } } if(c==0){ cout<<"No"; } return 0; }