Run ID:84006
提交时间:2024-07-15 10:57:56
# include<iostream> using namespace std; int s (int w){ for(int i=2;i<w;i++){ if(w%i==0)return 0; } return 1; } int main(){ int v=0; int w,x=0; cin>>w; for(int i=2;i<w;i++){ if(s(i)&&s(i+2)){ cout<<i<<' '<<i+2<<endl; x++; } } if(x==0)cout<<"No"; return 0; }