| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 163822 | 丁陆永新 | 寻找绝对素数 | C++ | Accepted | 14 MS | 276 KB | 638 | 2026-10-31 10:01:16 |
#include<bits/stdc++.h> using namespace std; bool ss(int x) { if(x==1) return false; else{ for(int i=2;i<=sqrt(x);i++) { if(x%i==0) { return false; } } return true; } } int qf(int x) { int s=0; while(x) { s=s*10+x%10; x/=10; } return s; } int main(){ int n,m,flag=0; cin>>m>>n; for(int i=m;i<=n;i++) { if(ss(i)&&ss(qf(i))) { flag++; if(flag==1) { cout<<i; } else { cout<<","<<i; } } } if(flag==0) { cout<<"No"; } return 0; }