Run ID:157833

提交时间:2026-08-18 13:48:02

#include<iostream> using namespace std; bool ss(int x){ if(x<2)return false; for(int i=2;i<=x/2;i++){ if(x%i==0)return false; } return true; } int fx(int x){ int t=0; while(x!=0){ t=t*10+x%10; x/=10; } return t; } int main(){ int M,N; cin>>M>>N; for(int i=M;i<=N;i++){ if(ss(i)&&ss(fx(i))){ c++; if(c==l)cout<<i; else cout<<<','<<i; } } if(c==0)cout<<"No"; return 0; }