| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158950 | 汪义罗 | 素数对 | C++ | Accepted | 25 MS | 272 KB | 423 | 2026-08-23 14:46:56 |
#include<iostream> using namespace std; bool ss (int n){ for(int t=2;t<n;t++){ if(n%t==0){ return false; } } return true; } int main() { int n; cin>>n; int qan=0,hou=1; int sn=0; for(int i=3;i<=n;i++){ if(ss(i)){ hou=i; if(hou-2==qan){ sn++; cout<<qan<<" "<<hou<<endl; } qan=hou; } } if(sn==0){ cout<<"No"; } return 0; }