32 条题解
-
0
#include<bits/stdc++.h> using namespace std; bool h(int n) { for(int i = 3; i * i <= n; i++) if(n % i == 0) return false; return true; } int main() { int n; cin >> n; bool f = false; for (int i = 3 ; i + 2 <= n ; i += 2 ) { if(h(i) && h(i+2)) cout<< i <<' '<< i+2 << endl , f = true; } if(!(f)) cout<<"empty"; }
信息
- ID
- 946
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 6
- 标签
- (无)
- 递交数
- 1556
- 已通过
- 434
- 上传者