| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157832 | 李沐阳 | 寻找绝对素数 | C++ | Accepted | 740 MS | 272 KB | 460 | 2026-08-18 13:45:55 |
#include<bits/stdc++.h> using namespace std; bool sushu(int q){ if(q<2) return false; for(int i=2;i<=q/2;i++){ if(q%i==0) return false; } return true; } int fx(int q){ int t=0; while(q!=0){ t=t*10+q%10; q/=10; } return t; } int main(){ int n,m,r,t=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(sushu(i)&&sushu(fx(i))){ t++; if(t==1) cout<<i; else cout<<','<<i; } } if(t==0) cout<<"No"<<endl; return 0; }