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