Run ID:132941
提交时间:2025-10-12 17:29:09
#include <bits/stdc++.h> using namespace std; int n; bool sushu(int k){ if(k<2){ return false; } for(int i=2;i<=k/2;i++){ if(k%i==0){ return false; } } return true; } int main(){ cin>>n; if(n<5){ cout<<"No"; return 0; } for(int j=3;j<=n-2;j++){ if(sushu(j)==true){ if(sushu(j+2)==true){ cout<<j<<" "<<j+2<<endl; } } } return 0; }