| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157827 | 张蔚林 | 寻找绝对素数 | C++ | Wrong Answer | 20 MS | 272 KB | 424 | 2026-08-18 13:39:19 |
#include<bits/stdc++.h> using namespace std; bool ss(int x){ for(int i=2;i<=x/2;i++){ if(x%i==0) return false; } return true; } int dx(int y){ int t=0; while(y){ t=t*10+y%10; y/=10; } return t; } int main(){ int m,n,c=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(ss(i)&&ss(dx(i))){ c++; if(c==1)cout<<i; else cout<<','<<i; } } if(c==0)cout<<"No"; return 0; }
------Input------
1 10
------Answer-----
2,3,5,7
------Your output-----
1,2,3,5,7