| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132709 | 晏莞煜 | 素数对 | C++ | Accepted | 33 MS | 280 KB | 369 | 2025-10-12 10:51:27 |
#include<iostream> using namespace std; bool su_shu(int x){ if(x<2){ return false; } for(int i=2;i<x;i++){ if(x%i==0){ return false; } } return true; } int n; int main(){ cin>>n; int cnt=0; for(int i=2;i<=n-2;i++){ if(su_shu(i) && su_shu(i+2)){ cout<<i<<" "<<i+2<<endl; cnt++; } } if(cnt==0){ cout<<"No"; } }