| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158982 | 刘杨国卿 | 素数对 | C++ | Wrong Answer | 1 MS | 272 KB | 357 | 2026-08-24 12:38:19 |
#include<bits/stdc++.h> using namespace std; bool l(int m){ for(int i=2;i<m;i++){ if(m%i==0){ return false; } } return true; } int main(){ int n; cin>>n; int w=1; bool f=true; for(int i=2;i<=n;i++){ if(l(i)){ if(w+2==i){ cout<<w<<" "<<i<<endl; f=false; } } } if(f){ cout<<"no"; } return 0; }
------Input------
17
------Answer-----
3 5 5 7 11 13
------Your output-----
1 3