Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164829 颜学俊逸 素数对 C++ Wrong Answer 2 MS 272 KB 353 2026-11-07 15:29:17

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; bool isss(int k){ if(k == 1) return 0 ; for(int i = 2;i <= sqrt(k);i++){ if(k % i == 0)return 0; } return 1; } int main(){ int x,f = 0; cin >> x; for(int i = 2;i <= x - 2;i++){ if(isss(i) && isss(i + 2)){ cout << i << " " << i + 2 <<endl; f = 1; } } cout << "No"; }


Run Info:

------Input------
17
------Answer-----
3 5 5 7 11 13
------Your output-----
3 5 5 7 11 13 No