| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132692 | 陈华仁星 | 素数对 | C++ | Accepted | 19 MS | 264 KB | 373 | 2025-10-12 10:32:02 |
#include <iostream> using namespace std; bool top_(int i) { for(int j=2;j<i;j++) { if(i%j==0) return false; } return true; } int main() { int n,cnt=0; scanf("%d",&n); for(int i=2;i<n-1;i++) { if(top_(i)) { if(top_(i+2)) { printf("%d %d\n",i,i+2); cnt++; } } } if(cnt==0) { printf("No"); } return 0; }