| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 141503 | 陈骏睿 | 寻找绝对素数 | C++ | Accepted | 11 MS | 272 KB | 726 | 2025-12-26 19:40:39 |
#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 iss(int n){ for(int i=2;i<=sqrt(n);i++){ if(n%i==0) return false; } return true; } int f(int x){ int y=0; while(x!=0){ y=y*10+x%10; x=x/10; } return y; } int main(){ int m,n,s=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i!=1&&iss(i)&&iss(f(i))){ s++; if(s==1) cout<<i; else cout<<","<<i; } } if(s==0) cout<<"No"<<endl; return 0; }