| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157828 | 李沐阳 | 寻找绝对素数 | C++ | Time Limit Exceeded | 1000 MS | 272 KB | 488 | 2026-08-18 13:39:42 |
#include<bits/stdc++.h> using namespace std; bool sushu(int q){ if(q<2) return false; int s=0; for(int i=1;i<=q;i++){ if(q%i==0) s++; } if(s>2) return false; else 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; }