-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1929.cpp
More file actions
35 lines (32 loc) · 740 Bytes
/
1929.cpp
File metadata and controls
35 lines (32 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <bits/stdc++.h>
#define FastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
int main(void){
FastIO;
int M,N;
cin>>M>>N;
for(int i=M; i<=N; i++){//M부터 N까지
if(i==1)continue;
if(i%2==0){
if(i==2){
cout<<i<<'\n';
continue;
}
continue;
}
else{
bool check =1;
for(int j=3; j*j<=i; j++){
if(i%j==0){
check=0;
break;
}
}
if(check)
cout<<i<<'\n';
}
}
}