Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67499 游四鑫 素数对 C++ Wrong Answer 18 MS 272 KB 324 2024-03-16 16:30:04

Tests(6/10):


Code:

# include<iostream> using namespace std; int s (int w){ for(int i=2;i<w;i++){ if(w%i==0)return 0; } return 1; } int main(){ bool n=0; int v=0; int w; cin>>w; for(int i=2;i<w-2;i++){ if(s(i)==1&&s(i+2)==1) cout<<i<<' '<<i+2<<endl; n++; } if(n==0)cout<<"No"; return 0; }


Run Info:

------Input------
73
------Answer-----
3 5 5 7 11 13 17 19 29 31 41 43 59 61 71 73
------Your output-----
3 5 5 7 11 13 17 19 29 31 41 43 59 61